Re: JDK-8150990: [packager] Research Refactoring Packager
On 27/04/2016 21:44, Kevin Rushforth wrote: Looks fine to me, too. Btw, I thought Mandy had earlier suggested jdk.tools.jlink.internal.packager as a name, but it's currently jdk.tools.internal.packager (without the jlink). I don't care one way or the other and the current one is shorter. Mandy's suggestion sounds right to me as jlink already has internals in jdk.tools.jlink.internal.**. If it's temporary then the suggest is probably okay although if temporary means to JDK 9 GA then it might be better to change it now. -Alan
Re: Ant JunitTask update to support JDK9 modules
Hi, I previously proposed module group concept that its member modules can be loaded by same classloader. If one module doesn't define its module goup, that defaulted to module's name. module ant.junit{ group: ant.junit; //this can be emitted: default values is module name } module ant.junit4{ group: ant.junit; ... } This way we can localize and somehow solve split package problems and provide support for migrating existing jars in maven repositories that have splited packages. On Thu, Apr 28, 2016 at 1:56 AM, Alex Buckley wrote: > On 4/27/2016 1:41 PM, Jan Lahoda wrote: > >> On 27.4.2016 21:30, Alex Buckley wrote: >> >>> Your changes skyrocket in complexity because your Ant setup involves >>> both ant-junit.jar and ant-junit4.jar. The JUnit task documentation >>> (https://ant.apache.org/manual/Tasks/junit.html) doesn't suggest this is >>> necessary or desirable. It's either pointless or dangerous to have both >>> JARs on the classpath, which is why the module system rejects them as >>> >> >> I think it would be useful if you could elaborate on why using both >> ant-junit.jar and ant-junit4.jar is pointless or dangerous. What I see >> in the jars, the org.apache.tools.ant.taskdefs.optional.junit package is >> perfectly partitioned between the jars (there is no class that would be >> in both jars). It seems ant-junit4.jar cannot work by itself, without >> ant-junit.jar. I am not 100% sure what ant-junit4.jar does, but it seems >> it aids in running single test method in a JUnit 4 way. There appears to >> be some fallback to JUnit 3 style if the JUnit 4 style is not available, >> but it is hard to say if that is sufficient. So dropping (the content >> of) ant-junit4.jar would mean at least careful testing, but more >> probably a loss of a significant feature. >> > > Perfect partitioning of a split package is uncommon. The common case is > some overlap of types, leading to obscure mix-and-match problems, so the > module system rejects a split package unconditionally. Ant's redistribution > of JUnit JARs (or perhaps its JUnit's own scheme for v3-to-v4 migration) is > architected in a way that's at odds with the module system. > > It might be possible to make a case for relaxing the anti-split-package > provision for automatic modules, since they're coming from the classpath > world where every artifact is "open" to combination with artifacts > elsewhere on the path. But that would reduce reliability, since generally > it's a _feature_ that the module system warns: > > java.lang.module.ResolutionException: Modules ant.junit4 and ant.junit > export package org.apache.tools.ant.taskdefs.optional.junit > to module hamcrest.core > > Alex > -- Best Regards, Ali Ebrahimi
Re: Ant JunitTask update to support JDK9 modules
On 27/04/2016 17:17, Tomas Zezula wrote: As seen in the modulepath and classpath mixture thread there are many possibilities how to execute unit tests. I've sumarised them on the ant-dev mailing list in the context of Apache Ant in http://mail-archives.apache.org/mod_mbox/ant-dev/201604.mbox/%3cafe6c849-0622-44d1-9ff7-3a6ca4832...@oracle.com%3E As a result of the discussion I've created a pull request for Apache Ant JUnitTask to support JDK9 modules: https://github.com/apache/ant/pull/18 On the qualified export approach then one thing you say is that it requires compiling with a "single multi-module compilation". You are right that compiling MyLibrary with a qualified export to MyLibraryTests will require MyLibraryTests to be on the module source path but you should be able to compile them separately if you want, this should do it: javac -modulesourcepath src -d mods $(find src/MyLibrary -name "*.java") javac -modulepath mods -d mods/MyLibraryTests $(find src/MyLibraryTests -name "*.java") On the split package issue then ant-junit and ant-junit4.jar does seem unusual. Do you know if they are in the same package because one needs package private access to something in the other? I have no interest in making the options more complicated but if you really want to then -Xpatch can patch automatic modules and so `-Xpatch:ant.junit=ant-junit4.jar` will eventually overlay the contents of ant-junit4.jar over module ant.junit. -Alan
hg: jigsaw/jake: Switch jtreg to 4.2 b02
Changeset: 216193d1f34d Author:alanb Date: 2016-04-28 12:13 +0100 URL: http://hg.openjdk.java.net/jigsaw/jake/rev/216193d1f34d Switch jtreg to 4.2 b02 ! common/conf/jib-profiles.js
Instrumentation API: module -> class loader with a security manager
I noticed a small obstacle while porting code to the Java 9 instrumentation API. It is now required to pass by a security manager to read the class loader from the module (via Module::getClassLoader). This was not required using the old API. In this sense, it is not really more secure since I can always fall back to the old API but I need to ask a user for an additional privilege that I did not need before if I want to use the new API and a security manager is active. Would it make sense to provide the class loader as an additional argument in the new instrumentation API to avoid this?
Re: Instrumentation API: module -> class loader with a security manager
On 28/04/2016 13:22, Rafael Winterhalter wrote: I noticed a small obstacle while porting code to the Java 9 instrumentation API. It is now required to pass by a security manager to read the class loader from the module (via Module::getClassLoader). This was not required using the old API. In this sense, it is not really more secure since I can always fall back to the old API but I need to ask a user for an additional privilege that I did not need before if I want to use the new API and a security manager is active. Would it make sense to provide the class loader as an additional argument in the new instrumentation API to avoid this? We have this listed in JDK-8155207 [1] to look at. Rémi brought this up too. In some sense then all bets are off when you run with an agent as it can manipulate bytecode to bypass permission checks. In other words, granting anything less than AllPermission may not make the environment any more secure. -Alan [1] https://bugs.openjdk.java.net/browse/JDK-8155207
Re: trouble with java -Xpatch
On 08/04/2016 14:50, Michael Rasmussen wrote: : So this would mean the agent would be able to get CLFH for _all_ classes, even Object, String, Class etc, that are the very first to be loaded, and potentially instrument the bytes for those classes as well? Of course still following the rules about not introducing any new packages etc at the time, since it would cause the module system verification to fail (yeah, been there, done that). If that is the case, that also seems like a good solution for me, which should still give me access to what I'm looking for. Also, it would basically mean that can_generate_all_class_hook_events would make CLFH work similar to how it does on previous versions. Just a quick mail to say that can_generate_early_class_hook_events (new capability) is in jdk9/hs so it should make it into JDK 9 master and into a promoted build soon (maybe jdk-9+117 or jdk-9+118). -Alan
Re: trouble with java -Xpatch
> Just a quick mail to say that can_generate_early_class_hook_events (new > capability) is in jdk9/hs so it should make it into JDK 9 master and into a > promoted build soon (maybe jdk-9+117 or jdk-9+118). > > -Alan Thank you very much! Looking forward to trying it out
Re: hg: jigsaw/jake/jdk: 3 new changesets
Hi Alan, I also have a little optimization for Module.extraPackages: http://cr.openjdk.java.net/~plevart/jdk9-dev/Module.extraPackages/webrev.01/ This is only used from java.lang.reflect.Proxy presently, so what is currently there is not performance critical, but if it gets used more, then the provided patch gives smaller footprint and O(n) instead of O(n^2) time to add n packages to a module + doesn't produce so much garbage. What do you think? On 04/27/2016 06:05 PM, alan.bate...@oracle.com wrote: Changeset: 8816a52d31dd Author:plevart Date: 2016-04-27 10:49 +0100 URL: http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/8816a52d31dd java.lang.reflect.Module.WeakSet is not thread-safe ! src/java.base/share/classes/java/lang/reflect/Module.java + src/java.base/share/classes/java/lang/reflect/WeakPairMap.java + test/java/lang/reflect/WeakPairMap/Driver.java + test/java/lang/reflect/WeakPairMap/java.base/java/lang/reflect/WeakPairMapTest.java Changeset: 243ea7e92d19 Author:alanb Date: 2016-04-27 11:10 +0100 URL: http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/243ea7e92d19 Merge ! src/java.base/share/classes/java/lang/reflect/Module.java Changeset: ba169b23b4c7 Author:alanb Date: 2016-04-27 15:31 +0100 URL: http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/ba169b23b4c7 Add support for -addmods ALL-DEFAULT ! make/launcher/Launcher-java.desktop.gmk ! make/launcher/Launcher-java.scripting.gmk ! make/launcher/Launcher-jdk.compiler.gmk ! make/launcher/Launcher-jdk.javadoc.gmk ! make/launcher/Launcher-jdk.jlink.gmk ! make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk ! src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java ! test/tools/launcher/modules/addmods/AddModsTest.java - test/tools/launcher/modules/addmods/src/app/Main.java - test/tools/launcher/modules/addmods/src/lib/jdk/lib/Util.java - test/tools/launcher/modules/addmods/src/lib/module-info.java + test/tools/launcher/modules/addmods/src/logger/logger/Logger.java + test/tools/launcher/modules/addmods/src/logger/module-info.java + test/tools/launcher/modules/addmods/src/test/module-info.java + test/tools/launcher/modules/addmods/src/test/test/Main.java
Re: JDK-8150990: [packager] Research Refactoring Packager
If it hasn’t been pushed I’ll change it? Chris > On Apr 27, 2016, at 11:58 PM, Alan Bateman wrote: > > > > On 27/04/2016 21:44, Kevin Rushforth wrote: >> Looks fine to me, too. >> >> Btw, I thought Mandy had earlier suggested jdk.tools.jlink.internal.packager >> as a name, but it's currently jdk.tools.internal.packager (without the >> jlink). I don't care one way or the other and the current one is shorter. > Mandy's suggestion sounds right to me as jlink already has internals in > jdk.tools.jlink.internal.**. If it's temporary then the suggest is probably > okay although if temporary means to JDK 9 GA then it might be better to > change it now. > > -Alan
Re: JDK-8150990: [packager] Research Refactoring Packager
Doesn’t look like it’s been pushed. I revised the change: http://cr.openjdk.java.net/~cbensen/JDK-8150990/webrev.01/ Chris > On Apr 28, 2016, at 6:55 AM, Chris Bensen wrote: > > If it hasn’t been pushed I’ll change it? > > Chris > > >> On Apr 27, 2016, at 11:58 PM, Alan Bateman wrote: >> >> >> >> On 27/04/2016 21:44, Kevin Rushforth wrote: >>> Looks fine to me, too. >>> >>> Btw, I thought Mandy had earlier suggested >>> jdk.tools.jlink.internal.packager as a name, but it's currently >>> jdk.tools.internal.packager (without the jlink). I don't care one way or >>> the other and the current one is shorter. >> Mandy's suggestion sounds right to me as jlink already has internals in >> jdk.tools.jlink.internal.**. If it's temporary then the suggest is probably >> okay although if temporary means to JDK 9 GA then it might be better to >> change it now. >> >> -Alan >
Re: JDK-8150990: [packager] Research Refactoring Packager
Ugh, day of mistakes. Here’s the correct link: http://cr.openjdk.java.net/~cbensen/JDK-8150990/webrev.02/ > On Apr 28, 2016, at 7:07 AM, Chris Bensen wrote: > > Doesn’t look like it’s been pushed. I revised the change: > > http://cr.openjdk.java.net/~cbensen/JDK-8150990/webrev.01/ > > Chris > > >> On Apr 28, 2016, at 6:55 AM, Chris Bensen wrote: >> >> If it hasn’t been pushed I’ll change it? >> >> Chris >> >> >>> On Apr 27, 2016, at 11:58 PM, Alan Bateman wrote: >>> >>> >>> >>> On 27/04/2016 21:44, Kevin Rushforth wrote: Looks fine to me, too. Btw, I thought Mandy had earlier suggested jdk.tools.jlink.internal.packager as a name, but it's currently jdk.tools.internal.packager (without the jlink). I don't care one way or the other and the current one is shorter. >>> Mandy's suggestion sounds right to me as jlink already has internals in >>> jdk.tools.jlink.internal.**. If it's temporary then the suggest is probably >>> okay although if temporary means to JDK 9 GA then it might be better to >>> change it now. >>> >>> -Alan >> >
Re: Adding packages to modules
On 28/04/2016 14:45, Peter Levart wrote: Hi Alan, I also have a little optimization for Module.extraPackages: http://cr.openjdk.java.net/~plevart/jdk9-dev/Module.extraPackages/webrev.01/ This is only used from java.lang.reflect.Proxy presently, so what is currently there is not performance critical, but if it gets used more, then the provided patch gives smaller footprint and O(n) instead of O(n^2) time to add n packages to a module + doesn't produce so much garbage. What do you think? No objection to changing this from copy-on-write to a CHM. The original implementation was to keep it simple and to special-case the one package case. It hasn't been a performance issue so far but if we have a lot of Proxy classes generated into the same module then it has potential. Your patch reminds me that we should probably change JVM_AddModulePackage to make it idempotent as dropping the computeIfAbsent here would make this more readable. I see you've changed to toArray in getPackages to use the size and curious if that helps (just thinking of Aleksey essay on this topic [1]). -Alan [1] http://shipilev.net/blog/2016/arrays-wisdom-ancients/
Re: JDK-8150990: [packager] Research Refactoring Packager
Looks good. -- Kevin Chris Bensen wrote: Ugh, day of mistakes. Here’s the correct link: http://cr.openjdk.java.net/~cbensen/JDK-8150990/webrev.02/ On Apr 28, 2016, at 7:07 AM, Chris Bensen wrote: Doesn’t look like it’s been pushed. I revised the change: http://cr.openjdk.java.net/~cbensen/JDK-8150990/webrev.01/ Chris On Apr 28, 2016, at 6:55 AM, Chris Bensen wrote: If it hasn’t been pushed I’ll change it? Chris On Apr 27, 2016, at 11:58 PM, Alan Bateman wrote: On 27/04/2016 21:44, Kevin Rushforth wrote: Looks fine to me, too. Btw, I thought Mandy had earlier suggested jdk.tools.jlink.internal.packager as a name, but it's currently jdk.tools.internal.packager (without the jlink). I don't care one way or the other and the current one is shorter. Mandy's suggestion sounds right to me as jlink already has internals in jdk.tools.jlink.internal.**. If it's temporary then the suggest is probably okay although if temporary means to JDK 9 GA then it might be better to change it now. -Alan
hg: jigsaw/jake/jdk: Consistent module descriptor output for the jmod and jar tool
Changeset: 9aca35cb3b89 Author:chegar Date: 2016-04-28 17:25 +0100 URL: http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/9aca35cb3b89 Consistent module descriptor output for the jmod and jar tool ! src/java.base/share/classes/module-info.java ! src/jdk.jartool/share/classes/sun/tools/jar/Main.java ! src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java ! test/tools/jar/modularJar/Basic.java
hg: jigsaw/jake/corba: 4 new changesets
Changeset: bb6bf34f121f Author:chegar Date: 2016-04-19 14:34 +0100 URL: http://hg.openjdk.java.net/jigsaw/jake/corba/rev/bb6bf34f121f 8148863: Remove sun.misc.ManagedLocalsThread from corba Reviewed-by: alanb, coffeys, msheppar ! src/java.corba/share/classes/com/sun/corba/se/impl/corba/RequestImpl.java ! src/java.corba/share/classes/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java ! src/java.corba/share/classes/com/sun/corba/se/impl/oa/poa/POAImpl.java ! src/java.corba/share/classes/com/sun/corba/se/impl/oa/poa/POAManagerImpl.java ! src/java.corba/share/classes/com/sun/corba/se/impl/oa/poa/POAPolicyMediatorImpl_R_USM.java ! src/java.corba/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java ! src/java.corba/share/classes/com/sun/corba/se/impl/orbutil/threadpool/ThreadPoolImpl.java ! src/java.corba/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java ! src/java.corba/share/classes/module-info.java Changeset: 7dfa7377a5e6 Author:lana Date: 2016-04-21 13:38 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/corba/rev/7dfa7377a5e6 Merge Changeset: 7a1b36bf2fe5 Author:lana Date: 2016-04-28 08:26 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/corba/rev/7a1b36bf2fe5 Added tag jdk-9+116 for changeset 7dfa7377a5e6 ! .hgtags Changeset: 91b58b20687a Author:alanb Date: 2016-04-28 18:54 +0100 URL: http://hg.openjdk.java.net/jigsaw/jake/corba/rev/91b58b20687a Merge ! src/java.corba/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java ! src/java.corba/share/classes/module-info.java
hg: jigsaw/jake/jaxws: 2 new changesets
Changeset: 58265b39fc74 Author:lana Date: 2016-04-28 08:26 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/jaxws/rev/58265b39fc74 Added tag jdk-9+116 for changeset 529f0bf896e5 ! .hgtags Changeset: 323c5d3dc3ee Author:alanb Date: 2016-04-28 18:54 +0100 URL: http://hg.openjdk.java.net/jigsaw/jake/jaxws/rev/323c5d3dc3ee Merge
hg: jigsaw/jake: 14 new changesets
Changeset: 5165182f2d88 Author:smarks Date: 2016-04-18 14:11 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/rev/5165182f2d88 8145468: update java.lang APIs with new deprecations Reviewed-by: lancea, alanb ! make/CompileJavaModules.gmk Changeset: 15223d3c4460 Author:dfazunen Date: 2016-04-07 17:43 +0400 URL: http://hg.openjdk.java.net/jigsaw/jake/rev/15223d3c4460 8152432: Implement setting jtreg @requires properties vm.flavor, vm.bits, vm.compMode Reviewed-by: iignatyev + test/jtreg-ext/requires/VMProps.java Changeset: 937d6b3e5b90 Author:dcubed Date: 2016-04-07 12:44 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/rev/937d6b3e5b90 Merge Changeset: cc16e2a24f94 Author:erikj Date: 2016-04-08 13:14 +0200 URL: http://hg.openjdk.java.net/jigsaw/jake/rev/cc16e2a24f94 8152666: The new Hotspot Build System Reviewed-by: ihse, dcubed, erikj Contributed-by: magnus.ihse.bur...@oracle.com, erik.joels...@oracle.com, ingemar.ab...@oracle.com ! common/autoconf/basics.m4 ! common/autoconf/build-performance.m4 ! common/autoconf/buildjdk-spec.gmk.in ! common/autoconf/compare.sh.in ! common/autoconf/configure ! common/autoconf/configure.ac ! common/autoconf/flags.m4 ! common/autoconf/generated-configure.sh ! common/autoconf/help.m4 ! common/autoconf/hotspot-spec.gmk.in ! common/autoconf/hotspot.m4 ! common/autoconf/jdk-options.m4 ! common/autoconf/jdk-version.m4 ! common/autoconf/lib-std.m4 ! common/autoconf/libraries.m4 ! common/autoconf/platform.m4 ! common/autoconf/spec.gmk.in ! common/autoconf/toolchain.m4 ! common/autoconf/version-numbers ! common/bin/compare.sh ! common/bin/compare_exceptions.sh.incl ! common/conf/jib-profiles.js ! make/Jprt.gmk ! make/Main.gmk ! make/common/MakeBase.gmk ! make/common/NativeCompilation.gmk ! make/jprt.properties Changeset: d5203f7c19f7 Author:jwilhelm Date: 2016-04-11 20:16 +0200 URL: http://hg.openjdk.java.net/jigsaw/jake/rev/d5203f7c19f7 Merge Changeset: 3277fe4cac92 Author:simonis Date: 2016-04-13 11:13 +0200 URL: http://hg.openjdk.java.net/jigsaw/jake/rev/3277fe4cac92 8154087: Fix AIX and Linux/ppc64le after the integration of the new hotspot build Reviewed-by: erikj, goetz ! common/autoconf/flags.m4 ! common/autoconf/generated-configure.sh ! common/autoconf/platform.m4 Changeset: 0382c2b23bbc Author:dcubed Date: 2016-04-14 14:57 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/rev/0382c2b23bbc Merge ! common/autoconf/compare.sh.in ! common/bin/compare.sh ! common/bin/compare_exceptions.sh.incl ! make/Main.gmk Changeset: 645c48292130 Author:amurillo Date: 2016-04-14 19:55 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/rev/645c48292130 Merge ! common/autoconf/generated-configure.sh ! common/bin/compare.sh ! make/Main.gmk ! make/common/MakeBase.gmk Changeset: c6b64d18affc Author:amurillo Date: 2016-04-18 15:39 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/rev/c6b64d18affc Merge ! common/autoconf/build-performance.m4 ! common/autoconf/configure.ac ! common/autoconf/generated-configure.sh ! common/autoconf/jdk-options.m4 ! common/autoconf/spec.gmk.in ! common/conf/jib-profiles.js ! make/Main.gmk Changeset: 5f71689d0b33 Author:amurillo Date: 2016-04-18 20:19 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/rev/5f71689d0b33 Merge Changeset: 81f1bcda3918 Author:lana Date: 2016-04-21 13:36 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/rev/81f1bcda3918 Merge Changeset: 6743a8e0cab7 Author:erikj Date: 2016-04-22 10:48 +0200 URL: http://hg.openjdk.java.net/jigsaw/jake/rev/6743a8e0cab7 8154326: bash >(...) construct causes race conditions Reviewed-by: tbell, ihse ! make/InitSupport.gmk ! make/common/MakeBase.gmk Changeset: bd32264e4108 Author:lana Date: 2016-04-28 08:26 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/rev/bd32264e4108 Added tag jdk-9+116 for changeset 6743a8e0cab7 ! .hgtags Changeset: 0b86e41eb7ba Author:alanb Date: 2016-04-28 19:17 +0100 URL: http://hg.openjdk.java.net/jigsaw/jake/rev/0b86e41eb7ba Merge ! common/autoconf/basics.m4 ! common/autoconf/buildjdk-spec.gmk.in ! common/autoconf/configure.ac ! common/autoconf/flags.m4 ! common/autoconf/generated-configure.sh ! common/autoconf/hotspot.m4 ! common/autoconf/jdk-options.m4 ! common/autoconf/platform.m4 ! common/autoconf/spec.gmk.in ! common/autoconf/toolchain.m4 ! common/bin/compare.sh ! common/conf/jib-profiles.js ! make/CompileJavaModules.gmk ! make/InitSupport.gmk ! make/Jprt.gmk ! make/Main.gmk ! make/common/MakeBase.gmk ! make/common/NativeCompilation.gmk ! make/jprt.properties
hg: jigsaw/jake/nashorn: 2 new changesets
Changeset: 8edbdd01b004 Author:lana Date: 2016-04-28 08:26 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/nashorn/rev/8edbdd01b004 Added tag jdk-9+116 for changeset 208388a5622d ! .hgtags Changeset: 1d6d80170685 Author:alanb Date: 2016-04-28 18:54 +0100 URL: http://hg.openjdk.java.net/jigsaw/jake/nashorn/rev/1d6d80170685 Merge ! .hgtags
hg: jigsaw/jake/jaxp: 5 new changesets
Changeset: 8be2998d17d6 Author:joehw Date: 2016-04-19 23:01 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/jaxp/rev/8be2998d17d6 8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place Reviewed-by: joehw Contributed-by: christoph.lan...@sap.com ! src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XML11EntityScanner.java ! src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java ! src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java ! src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java ! src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityScanner.java ! src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLScanner.java ! src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages.properties ! src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties ! src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_es.properties ! src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_fr.properties ! src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_it.properties ! src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/HTTPInputSource.java ! test/javax/xml/jaxp/unittest/TEST.properties ! test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6668115Test.java + test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug8153781.java Changeset: 4fa3ca2e8105 Author:fyuan Date: 2016-04-19 23:56 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/jaxp/rev/4fa3ca2e8105 8078820: Test deploying a XML parser as a module Reviewed-by: joehw, alanb Contributed-by: Frank Yuan + test/javax/xml/jaxp/libs/jdk/testlibrary/Asserts.java + test/javax/xml/jaxp/libs/jdk/testlibrary/CompilerUtils.java + test/javax/xml/jaxp/libs/jdk/testlibrary/JDKToolFinder.java + test/javax/xml/jaxp/libs/jdk/testlibrary/JDKToolLauncher.java + test/javax/xml/jaxp/libs/jdk/testlibrary/OutputAnalyzer.java + test/javax/xml/jaxp/libs/jdk/testlibrary/OutputBuffer.java + test/javax/xml/jaxp/libs/jdk/testlibrary/Platform.java + test/javax/xml/jaxp/libs/jdk/testlibrary/ProcessTools.java + test/javax/xml/jaxp/libs/jdk/testlibrary/README.txt + test/javax/xml/jaxp/libs/jdk/testlibrary/StreamPumper.java + test/javax/xml/jaxp/libs/jdk/testlibrary/Utils.java + test/javax/xml/jaxp/module/ServiceProviderTest/BasicModularXMLParserTest.java + test/javax/xml/jaxp/module/ServiceProviderTest/LayerModularXMLParserTest.java + test/javax/xml/jaxp/module/ServiceProviderTest/src/test/module-info.java + test/javax/xml/jaxp/module/ServiceProviderTest/src/test/test/XMLFactoryHelper.java + test/javax/xml/jaxp/module/ServiceProviderTest/src/unnamed/Main.java + test/javax/xml/jaxp/module/ServiceProviderTest/src/xmlprovider1/module-info.java + test/javax/xml/jaxp/module/ServiceProviderTest/src/xmlprovider1/xp1/DocumentBuilderFactoryImpl.java + test/javax/xml/jaxp/module/ServiceProviderTest/src/xmlprovider1/xp1/SAXParserFactoryImpl.java + test/javax/xml/jaxp/module/ServiceProviderTest/src/xmlprovider1/xp1/SchemaFactoryImpl.java + test/javax/xml/jaxp/module/ServiceProviderTest/src/xmlprovider1/xp1/TransformerFactoryImpl.java + test/javax/xml/jaxp/module/ServiceProviderTest/src/xmlprovider1/xp1/XMLInputFactoryImpl.java + test/javax/xml/jaxp/module/ServiceProviderTest/src/xmlprovider1/xp1/XMLOutputFactoryImpl.java + test/javax/xml/jaxp/module/ServiceProviderTest/src/xmlprovider1/xp1/XPathFactoryImpl.java + test/javax/xml/jaxp/module/ServiceProviderTest/src/xmlprovider2/module-info.java + test/javax/xml/jaxp/module/ServiceProviderTest/src/xmlprovider2/xp2/DatatypeFactoryImpl.java + test/javax/xml/jaxp/module/ServiceProviderTest/src/xmlprovider2/xp2/XMLEventFactoryImpl.java + test/javax/xml/jaxp/module/TEST.properties Changeset: 9d71d20e6147 Author:lana Date: 2016-04-21 13:37 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/jaxp/rev/9d71d20e6147 Merge Changeset: ac55dc7dd558 Author:lana Date: 2016-04-28 08:26 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/jaxp/rev/ac55dc7dd558 Added tag jdk-9+116 for changeset 9d71d20e6147 ! .hgtags Changeset: d864055e565b Author:alanb Date: 2016-04-28 18:54 +0100 URL: http://hg.openjdk.java.net/jigsaw/jake/jaxp/rev/d864055e565b Merge ! test/javax/xml/jaxp/unittest/TEST.properties
hg: jigsaw/jake/langtools: 14 new changesets
Changeset: bcf9765e73b1 Author:alundblad Date: 2016-04-18 21:07 +0200 URL: http://hg.openjdk.java.net/jigsaw/jake/langtools/rev/bcf9765e73b1 8036952: copyright issues in jdk9/dev/langtools files Summary: Updated copyright notices. Reviewed-by: jjg, jlahoda ! src/jdk.compiler/share/classes/com/sun/tools/javac/file/FSInfo.java ! test/tools/javac/6520152/T.java ! test/tools/javac/6520152/T6520152.java ! test/tools/javac/6521805/T6521805e.out ! test/tools/javac/6521805/p/Outer.java ! test/tools/javac/6521805/p/Sub.java ! test/tools/javac/6547131/T.java ! test/tools/javac/6589361/T6589361.java ! test/tools/javac/6668794/badSource/Test.java ! test/tools/javac/annotations/typeAnnotations/referenceinfos/Test.java ! test/tools/javac/api/6731573/Erroneous.java ! test/tools/javac/flow/T8062747.java ! test/tools/javac/jvm/6397652/com/test/Test$Test$Test.java ! test/tools/javac/jvm/6397652/com/test/Test$Test.java ! test/tools/javac/lambda/badMemberRefBytecode/Main.java ! test/tools/javac/lambda/badMemberRefBytecode/Use.java ! test/tools/javac/lambda/lambdaExecution/TBlock.java ! test/tools/javac/policy/test3/A.java ! test/tools/javac/synthesize/src/Double.java ! test/tools/javac/synthesize/src/Float.java ! test/tools/javac/warnings/6594914/Auxiliary.java ! test/tools/javac/warnings/6594914/ExplicitCompilation.out ! test/tools/javac/warnings/6594914/ImplicitCompilation.out ! test/tools/javap/4111861/A.java Changeset: 8214105024db Author:alundblad Date: 2016-04-18 22:25 +0200 URL: http://hg.openjdk.java.net/jigsaw/jake/langtools/rev/8214105024db 7152104: javac should not warn about missing serialVersionUID for anonymous inner classes Summary: Javac no longer issues warnings for missing serialVersionUID in anonymous classes. Reviewed-by: jlahoda ! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java - test/tools/javac/SerialWarn.java - test/tools/javac/SerialWarn.out ! test/tools/javac/T6554097.java ! test/tools/javac/T6554097.out ! test/tools/javac/diags/examples/AnonymousClass.java - test/tools/javac/positions/T6253161.java - test/tools/javac/positions/T6253161.out - test/tools/javac/positions/T6253161a.java - test/tools/javac/positions/T6253161a.out + test/tools/javac/serial/SerialWarn.java + test/tools/javac/serial/SerialWarn.out + test/tools/javac/serial/SerialWarnAnon.java Changeset: 080e6e093a70 Author:smarks Date: 2016-04-18 14:04 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/langtools/rev/080e6e093a70 8145468: update java.lang APIs with new deprecations Reviewed-by: mcimadamore ! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ConstFold.java ! src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java ! src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java ! src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java Changeset: f6848c7b9e45 Author:jjg Date: 2016-04-18 18:41 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/langtools/rev/f6848c7b9e45 8154504: javac tests fail after JDK API is deprecated Reviewed-by: darcy ! test/tools/javac/CaptureInSubtype.java ! test/tools/javac/OverrideChecks/T4721069.java ! test/tools/javac/generics/Nonlinear.java ! test/tools/javac/generics/odersky/BadTest4.java ! test/tools/javac/lambda/8074381/T8074381a.java ! test/tools/javac/lambda/8074381/T8074381a.out ! test/tools/javac/lambda/TargetType27.java Changeset: c0b062e1effd Author:jjg Date: 2016-04-18 19:14 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/langtools/rev/c0b062e1effd 8154500: fix handling of jdk.launcher.patch.* in tests Reviewed-by: ksrini ! test/jdk/javadoc/tool/6964914/TestStdDoclet.java ! test/jdk/javadoc/tool/6964914/TestUserDoclet.java ! test/tools/javadoc/6964914/TestStdDoclet.java ! test/tools/javadoc/6964914/TestUserDoclet.java Changeset: d30f35629f0e Author:jlahoda Date: 2016-04-19 14:16 +0200 URL: http://hg.openjdk.java.net/jigsaw/jake/langtools/rev/d30f35629f0e 7020499: Project Coin: improvements to try-with-resources desugaring Summary: Avoid unnecessary check for resource nullness if the resource is known to be non-null; put resource closing code in a method that is shared by multiple try-with-resources. Reviewed-by: darcy, mcimadamore, vromero ! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java + test/tools/javac/TryWithResources/TwrAvoidNullCheck.java + test/tools/javac/TryWithResources/TwrClose.java + test/tools/javac/TryWithResources/TwrShareCloseCode.java ! test/tools/javac/annotations/typeAnnotations/referenceinfos/ResourceVariable.java ! test/tools/javac/flow/tests/TestCaseTry.java Changeset: d59948777810 Author:rfield Date: 2016-04-20 08:30 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/langtools/rev/d59948777810 8154445: JShell: Drop residual use of addReads from jshell Reviewed-by: alanb, ksrini ! src/jdk.jshell/share/classes/jdk/internal/jshell/remote/RemoteAgent.java Changes
hg: jigsaw/jake/jdk: 105 new changesets
Changeset: 96d7dc590098 Author:sherman Date: 2016-04-18 10:57 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/96d7dc590098 8154403: JRT filesystem loaded by JDK8 with URLClassLoader is not closable since JDK-8147460 Reviewed-by: alanb ! src/java.base/share/classes/jdk/internal/jrtfs/JrtFileSystemProvider.java ! test/jdk/internal/jrtfs/WithSecurityManager.java ! test/jdk/internal/jrtfs/remote/Main.java ! test/jdk/internal/jrtfs/remote/RemoteRuntimeImageTest.java Changeset: 4eff3bde0dc3 Author:prappo Date: 2016-04-18 19:40 +0100 URL: http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/4eff3bde0dc3 8153353: HPACK implementation Reviewed-by: chegar, rriggs + src/java.httpclient/share/classes/sun/net/httpclient/hpack/BinaryRepresentationWriter.java + src/java.httpclient/share/classes/sun/net/httpclient/hpack/BulkSizeUpdateWriter.java + src/java.httpclient/share/classes/sun/net/httpclient/hpack/Decoder.java + src/java.httpclient/share/classes/sun/net/httpclient/hpack/DecodingCallback.java + src/java.httpclient/share/classes/sun/net/httpclient/hpack/Encoder.java + src/java.httpclient/share/classes/sun/net/httpclient/hpack/HeaderTable.java + src/java.httpclient/share/classes/sun/net/httpclient/hpack/Huffman.java + src/java.httpclient/share/classes/sun/net/httpclient/hpack/ISO_8859_1.java + src/java.httpclient/share/classes/sun/net/httpclient/hpack/IndexNameValueWriter.java + src/java.httpclient/share/classes/sun/net/httpclient/hpack/IndexedWriter.java + src/java.httpclient/share/classes/sun/net/httpclient/hpack/IntegerReader.java + src/java.httpclient/share/classes/sun/net/httpclient/hpack/IntegerWriter.java + src/java.httpclient/share/classes/sun/net/httpclient/hpack/LiteralNeverIndexedWriter.java + src/java.httpclient/share/classes/sun/net/httpclient/hpack/LiteralWithIndexingWriter.java + src/java.httpclient/share/classes/sun/net/httpclient/hpack/LiteralWriter.java + src/java.httpclient/share/classes/sun/net/httpclient/hpack/SizeUpdateWriter.java + src/java.httpclient/share/classes/sun/net/httpclient/hpack/StringReader.java + src/java.httpclient/share/classes/sun/net/httpclient/hpack/StringWriter.java + src/java.httpclient/share/classes/sun/net/httpclient/hpack/package-info.java + test/java/net/httpclient/http2/HpackDriver.java + test/java/net/httpclient/http2/java.httpclient/sun/net/httpclient/hpack/BinaryPrimitivesTest.java + test/java/net/httpclient/http2/java.httpclient/sun/net/httpclient/hpack/BuffersTestingKit.java + test/java/net/httpclient/http2/java.httpclient/sun/net/httpclient/hpack/CircularBufferTest.java + test/java/net/httpclient/http2/java.httpclient/sun/net/httpclient/hpack/DecoderTest.java + test/java/net/httpclient/http2/java.httpclient/sun/net/httpclient/hpack/EncoderTest.java + test/java/net/httpclient/http2/java.httpclient/sun/net/httpclient/hpack/HeaderTableTest.java + test/java/net/httpclient/http2/java.httpclient/sun/net/httpclient/hpack/HuffmanTest.java + test/java/net/httpclient/http2/java.httpclient/sun/net/httpclient/hpack/SpecHelper.java + test/java/net/httpclient/http2/java.httpclient/sun/net/httpclient/hpack/TestHelper.java Changeset: e940ba799ea7 Author:chegar Date: 2016-04-18 20:58 +0100 URL: http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/e940ba799ea7 8147553: Remove sun.misc.ManagedLocalsThread from java.management Reviewed-by: dfuchs ! src/java.management/share/classes/com/sun/jmx/remote/internal/ClientCommunicatorAdmin.java ! src/java.management/share/classes/com/sun/jmx/remote/internal/ClientNotifForwarder.java ! src/java.management/share/classes/com/sun/jmx/remote/internal/ServerCommunicatorAdmin.java ! src/java.management/share/classes/javax/management/monitor/Monitor.java ! src/java.management/share/classes/module-info.java ! src/java.management/share/classes/sun/management/jdp/JdpController.java Changeset: 54fb2d67b862 Author:chegar Date: 2016-04-18 20:58 +0100 URL: http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/54fb2d67b862 8153372: Remove sun.misc.ManagedLocalsThread from jdk.httpserver Reviewed-by: alanb ! src/jdk.httpserver/share/classes/module-info.java ! src/jdk.httpserver/share/classes/sun/net/httpserver/ServerImpl.java Changeset: dfe21904a466 Author:chegar Date: 2016-04-18 20:58 +0100 URL: http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/dfe21904a466 8153158: Remove sun.misc.ManagedLocalsThread from java.logging Reviewed-by: dfuchs, redestad ! src/java.logging/share/classes/java/util/logging/LogManager.java ! src/java.logging/share/classes/module-info.java Changeset: 92280897299f Author:smarks Date: 2016-04-18 14:10 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/92280897299f 8145468: update java.lang APIs with new deprecations Reviewed-by: alanb, psandoz, lancea, forax, scolebourne, chegar, martin ! src/java.base/share/classes/java/lang/Boolean.java ! src/java.base/share/classes/java/lang/Byte.java ! src/java.base/share/class
hg: jigsaw/jake/hotspot: 104 new changesets
Changeset: f93500768dca Author:shade Date: 2016-04-06 10:50 +0300 URL: http://hg.openjdk.java.net/jigsaw/jake/hotspot/rev/f93500768dca 8153277: [TESTBUG] gc/arguments/TestMaxMinHeapFreeRatioFlags is too sensitive for stray allocations in verifyRatio Reviewed-by: mgerdin, dfazunen ! test/gc/arguments/TestMaxMinHeapFreeRatioFlags.java Changeset: 883cb1b6b204 Author:tschatzl Date: 2016-04-06 13:32 +0200 URL: http://hg.openjdk.java.net/jigsaw/jake/hotspot/rev/883cb1b6b204 8077144: Concurrent mark initialization takes too long Summary: Remove per-marking thread liveness bitmaps and recreate liveness bitmap concurrently after the cleanup pause. Reviewed-by: mgerdin, ehelin, kbarrett ! src/share/vm/gc/g1/concurrentMarkThread.cpp ! src/share/vm/gc/g1/g1ConcurrentMark.cpp ! src/share/vm/gc/g1/g1ConcurrentMark.hpp ! src/share/vm/gc/g1/g1ConcurrentMark.inline.hpp ! src/share/vm/gc/g1/g1EvacFailure.cpp ! src/share/vm/gc/g1/g1OopClosures.inline.hpp ! src/share/vm/gc/g1/g1_globals.hpp ! src/share/vm/utilities/bitMap.cpp ! src/share/vm/utilities/bitMap.hpp ! test/gc/g1/Test2GbHeap.java Changeset: 4e9aaa557de4 Author:tschatzl Date: 2016-04-06 13:41 +0200 URL: http://hg.openjdk.java.net/jigsaw/jake/hotspot/rev/4e9aaa557de4 8151386: Extract card live data out of G1ConcurrentMark Summary: Move card live data management out of G1ConcurrentMark into extra class G1CardLiveData managed by G1RemSet Reviewed-by: mgerdin, kbarrett ! src/share/vm/gc/g1/concurrentMarkThread.cpp + src/share/vm/gc/g1/g1CardLiveData.cpp + src/share/vm/gc/g1/g1CardLiveData.hpp + src/share/vm/gc/g1/g1CardLiveData.inline.hpp ! src/share/vm/gc/g1/g1CollectedHeap.cpp ! src/share/vm/gc/g1/g1CollectedHeap.hpp ! src/share/vm/gc/g1/g1CollectedHeap.inline.hpp ! src/share/vm/gc/g1/g1ConcurrentMark.cpp ! src/share/vm/gc/g1/g1ConcurrentMark.hpp ! src/share/vm/gc/g1/g1ConcurrentMark.inline.hpp ! src/share/vm/gc/g1/g1OopClosures.hpp ! src/share/vm/gc/g1/g1RemSet.cpp ! src/share/vm/gc/g1/g1RemSet.hpp ! src/share/vm/gc/g1/heapRegionRemSet.cpp ! src/share/vm/gc/g1/heapRegionRemSet.hpp ! src/share/vm/utilities/bitMap.cpp ! src/share/vm/utilities/bitMap.hpp Changeset: 20b4d892988e Author:hseigel Date: 2016-04-06 07:37 -0400 URL: http://hg.openjdk.java.net/jigsaw/jake/hotspot/rev/20b4d892988e 8152846: Creation of ModuleEntryTable Investigate Need For OrderAccess::storestore() Summary: Remove the unneeded OrderAccess::storestore() call Reviewed-by: acorn, coleenp ! src/share/vm/classfile/classLoaderData.cpp Changeset: 5d720f8c105b Author:hseigel Date: 2016-04-06 16:03 +0200 URL: http://hg.openjdk.java.net/jigsaw/jake/hotspot/rev/5d720f8c105b Merge Changeset: 8c4142c9f8ab Author:kzhaldyb Date: 2016-03-14 20:00 +0300 URL: http://hg.openjdk.java.net/jigsaw/jake/hotspot/rev/8c4142c9f8ab 8144073: Refactor hotspot/test/gc/g1/humongousObjects/TestHumongousThreshold.java Reviewed-by: tschatzl, dfazunen ! test/gc/g1/humongousObjects/TestHumongousThreshold.java Changeset: 8d8ff222b16a Author:ccheung Date: 2016-04-06 11:40 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/hotspot/rev/8d8ff222b16a 8152329: jvm should treat the "Multi-Release" jar manifest attribute name as case insensitive Reviewed-by: iklam, jiangli, mseledtsov ! src/share/vm/classfile/classLoader.cpp ! src/share/vm/classfile/classLoader.hpp Changeset: 267c4a802a65 Author:ccheung Date: 2016-04-07 00:25 +0200 URL: http://hg.openjdk.java.net/jigsaw/jake/hotspot/rev/267c4a802a65 Merge Changeset: 61399ae28486 Author:dcubed Date: 2016-04-06 15:49 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/hotspot/rev/61399ae28486 Merge Changeset: 87215e99d945 Author:dcubed Date: 2016-04-06 23:42 + URL: http://hg.openjdk.java.net/jigsaw/jake/hotspot/rev/87215e99d945 Merge Changeset: ccad9c52f2bd Author:tonyp Date: 2016-04-07 10:55 +0200 URL: http://hg.openjdk.java.net/jigsaw/jake/hotspot/rev/ccad9c52f2bd 8152312: ParNew: Restore preserved marks in parallel Reviewed-by: tschatzl ! src/share/vm/gc/serial/defNewGeneration.cpp ! src/share/vm/gc/shared/preservedMarks.cpp ! src/share/vm/gc/shared/preservedMarks.hpp ! src/share/vm/gc/shared/preservedMarks.inline.hpp Changeset: f6040051ba0f Author:tschatzl Date: 2016-04-07 15:17 +0200 URL: http://hg.openjdk.java.net/jigsaw/jake/hotspot/rev/f6040051ba0f 8153734: TestHumongousReferenceObject.java occasionally crashes with "unable to allocate heap of 1g" on win32 Summary: Decrease the heap size used in the test from 1g to 128M. Reviewed-by: dfazunen, sjohanss ! test/gc/TestHumongousReferenceObject.java Changeset: 3df7fc5a5b24 Author:dfazunen Date: 2016-04-07 17:42 +0400 URL: http://hg.openjdk.java.net/jigsaw/jake/hotspot/rev/3df7fc5a5b24 8152432: Implement setting jtreg @requires properties vm.flavor, vm.bits, vm.compMode Reviewed-by: iignatyev ! test/TES
Re: Adding packages to modules
On 04/28/2016 04:45 PM, Alan Bateman wrote: On 28/04/2016 14:45, Peter Levart wrote: Hi Alan, I also have a little optimization for Module.extraPackages: http://cr.openjdk.java.net/~plevart/jdk9-dev/Module.extraPackages/webrev.01/ This is only used from java.lang.reflect.Proxy presently, so what is currently there is not performance critical, but if it gets used more, then the provided patch gives smaller footprint and O(n) instead of O(n^2) time to add n packages to a module + doesn't produce so much garbage. What do you think? No objection to changing this from copy-on-write to a CHM. The original implementation was to keep it simple and to special-case the one package case. It hasn't been a performance issue so far but if we have a lot of Proxy classes generated into the same module then it has potential. Your patch reminds me that we should probably change JVM_AddModulePackage to make it idempotent as dropping the computeIfAbsent here would make this more readable. I see you've changed to toArray in getPackages to use the size and curious if that helps (just thinking of Aleksey essay on this topic [1]). -Alan [1] http://shipilev.net/blog/2016/arrays-wisdom-ancients/ ...I did that automatically. Reading Aleksey essay now I see there's no point in doing that. For ArrayList case it even has a negative impact. We learn something every day. Regards, Peter
hg: jigsaw/jake/jdk: 2 new changesets
Changeset: e7afc8dbc874 Author:cbensen Date: 2016-04-28 08:28 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/e7afc8dbc874 8150990: Add helper class in jdk.jlink for packager use to avoid coordination with FX and JDK builds Reviewed-by: alanb, mchung, kcr, sundar + src/jdk.jlink/share/classes/jdk/tools/jlink/internal/packager/AppRuntimeImageBuilder.java Changeset: 62570fdf5cb5 Author:mchung Date: 2016-04-28 14:45 -0700 URL: http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/62570fdf5cb5 Merge AppRuntimeImageBuilder with jlink change ! src/jdk.jlink/share/classes/jdk/tools/jlink/internal/packager/AppRuntimeImageBuilder.java
hg: jigsaw/jake/hotspot: Don't assert when -Xpatch contains a jar file by fixing DumpSharedSpaces check
Changeset: 0d66108dfc2a Author:hseigel Date: 2016-04-28 18:31 -0400 URL: http://hg.openjdk.java.net/jigsaw/jake/hotspot/rev/0d66108dfc2a Don't assert when -Xpatch contains a jar file by fixing DumpSharedSpaces check ! src/share/vm/classfile/classLoader.cpp
RFR 8155088, Fix module dependencies in java/sql/* and javax/* tests
Hi there, please review the changes to explicitly declare module dependencies for "java/sql/*" and "javax/*" tests; Bug: https://bugs.openjdk.java.net/browse/JDK-8155088 Webrev: http://cr.openjdk.java.net/~xiaofeya/8155088/webrev.00/ Thanks, Felix
Re: Ping - Re: RFR 8078812, Test RMI with client and servers as modules
Hi Stuart, thanks a lot for the comments! -Felix On 2016/4/28 9:06, Stuart Marks wrote: Hi Felix, I finally got a chance to take a good look at this. Again, sorry for the delays. I was able to reproduce the failure and find a fix for it. There are also some structural issues with the test that will require some improvements. * * * First is the way the test fixture is set up. The test now has a single copy of the source code for the client, server, and app, and they're compiled once. This is good. Unfortunately, the tests modify the filesystem in order to set up different cases for the classes' modular structure. The problem is that makes the tests dependent on each other. The Test-NG directives enforce this execution order, but it makes them really hard to work with. For example, if I were to disable test #2, this would cause test #3 to fail since #3 depends on side effects from test #2. Also, if test #2 were to fail, it's hard to debug, since test #3 modifies the fixture after test #2 runs, potentially obscuring any problems that #2 might have run into. Ideally the test should set up a single test fixture and not modify it, allowing the different cases to be run independently. Offhand I'm not sure of the best way to do this. One approach that might be worth exploring is to create several different jar files from the class files; the jar files would have the classes in different modular configurations. Then, each test would invoke a JVM with arguments to put the different jar files on the classpath or the module path. I haven't investigated this approach, though, so I don't know if it's practical. Other approaches may be viable as well. It's probably worth discussing and prototyping an approach first before you spend too much time implementing any particular scheme. It was chosen to compile once considering efficiency. If we prefer each test can be executed separately, it looks enough to just change "@BeforeTest" to "@BeforeMethod" and update tests slightly. With jar files, may I understand it is a different scenario with automatic modules. I suggest to add a new test in future enhancement. See http://cr.openjdk.java.net/~xiaofeya/8078812/webrev.02 -Felix * * * Moving on to the actual test failure, the message from testUnnamedApp() is as follows: == Command line: [/Users/src/jdk-dev/jdk9-dev/build/macosx-x86_64-normal-server-fastdebug/jdk/bin/java -ea -esa -mp mods -Djava.rmi.server.codebase=file:/Users/src/jdk-dev/jdk9-dev/jdk/testoutput/JTwork/java/rmi/module/ModuleTest/./mods/mserver/ -cp classes testpkg.DummyApp 65071 ] Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.NoClassDefFoundError: serverpkg/Hello at java.lang.Class.getDeclaredMethods0(java.base/Native Method) at java.lang.Class.privateGetDeclaredMethods(java.base/Class.java:2937) at java.lang.Class.privateGetMethodRecursive(java.base/Class.java:3282) at java.lang.Class.getMethod0(java.base/Class.java:3252) at java.lang.Class.getMethod(java.base/Class.java:1961) at sun.launcher.LauncherHelper.validateMainClass(java.base/LauncherHelper.java:648) at sun.launcher.LauncherHelper.checkAndLoadMain(java.base/LauncherHelper.java:499) Caused by: java.lang.ClassNotFoundException: serverpkg.Hello at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base/BuiltinClassLoader.java:366) at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(java.base/ClassLoaders.java:184) at java.lang.ClassLoader.loadClass(java.base/ClassLoader.java:419) ... 7 more test ModuleTest.testUnnamedApp(): failure java.lang.AssertionError: expected [0] but found [1] [remainder of stack trace elided] == The main class is testpkg.DummyApp, but the launcher fails with NoClassDefFoundError on serverpkg/Hello. This was a bit of a puzzle, but I finally figured out that this is occurring during the verification of the DummyApp class. DummyApp depends on Hello, which can't be found, so it fails verification before DummyApp.main() gets called. It's also strange that it says "A JNI error has occurred" but that might be a red herring. In any case the real issue is that serverpkg.Hello can't be found. The reason it can't be found is that it's in a module. That module is on the module path, but the module isn't resolved by default. Thus its classes aren't visible to classes in the unnamed module. To add modules to the set of resolved modules, use the -addmods option. In this case, testUnnamedApp() has the client and server classes in modules, so it needs to have the arguments -addmods mclient,mserver added to its command line. Since the mclient module explicitly depends on the mserver module, this could instead just e -addmods mclient The testUnnamedAppandClient() metho