RFR: 8171400: Move checking of duplicate packages in the boot layer to link time

Mandy Chung mandy.chung at oracle.com
Mon Dec 19 22:41:46 UTC 2016

tools/launcher/modules/patch/systemmodules/PatchSystemModules.java needs to be updated since ModuleBootstrap now depends on this new method:

diff --git a/test/tools/launcher/modules/patch/systemmodules/src1/java.base/jdk/internal/modules/SystemModules.java b/test/tools/launcher/modules/patch/systemmodules/src1/java.base/jdk/internal/modules/SystemModules.java
--- a/test/tools/launcher/modules/patch/systemmodules/src1/java.base/jdk/internal/modules/SystemModules.java
+++ b/test/tools/launcher/modules/patch/systemmodules/src1/java.base/jdk/internal/modules/SystemModules.java
@@ -29,4 +29,8 @@
 public final class SystemModules {
     public static final String[] MODULE_NAMES = new String[0];
+    public static boolean hasSplitPackages() {
+        return true;

Since this fix has been pushed, I will fix this with a separate issue.


> On Dec 19, 2016, at 4:30 AM, Claes Redestad <claes.redestad at oracle.com> wrote:
> Hi,
> this patch adds a check to see if there are any split packages in the system
> modules at link time, and uses this information to enable us to safely skip
> a runtime check during bootstrap for the common case that there are none
> of the sort.
> Webrev[1]: http://cr.openjdk.java.net/~redestad/8171400/webrev.01/
> Bug: https://bugs.openjdk.java.net/browse/JDK-8171400
> This removes a chunk of the module system bootstrap overhead, and also
> amends a small issue where PACKAGES_IN_BOOT_LAYER would be wrong in the
> presence of split packages.
> Thanks!
> /Claes
> [1] Since cr.openjdk.java.net is down I've also attached the raw patch.
> <jdk.changeset>

More information about the jigsaw-dev mailing list