changeset 16747:8c022f735023

8175079: Lazy initialization of ImageReader breaks rmid Reviewed-by: alanb
author redestad
date Thu, 16 Feb 2017 17:28:50 +0100
parents b0fe19c8a49e
children 26a708e71902 a4d094e7dd1f
files src/java.base/share/classes/java/lang/System.java src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java
diffstat 2 files changed, 1 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/System.java	Thu Feb 16 11:26:14 2017 +0000
+++ b/src/java.base/share/classes/java/lang/System.java	Thu Feb 16 17:28:50 2017 +0100
@@ -1945,9 +1945,6 @@
         // set security manager
         String cn = System.getProperty("java.security.manager");
         if (cn != null) {
-            // ensure image reader for java.base is initialized before security manager
-            Object.class.getResource("module-info.class");
-
             if (cn.isEmpty() || "default".equals(cn)) {
                 System.setSecurityManager(new SecurityManager());
             } else {
--- a/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java	Thu Feb 16 11:26:14 2017 +0000
+++ b/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java	Thu Feb 16 17:28:50 2017 +0100
@@ -115,12 +115,7 @@
         long t0 = System.nanoTime();
 
         // system modules (may be patched)
-        ModuleFinder systemModules;
-        if (SystemModules.MODULE_NAMES.length > 0) {
-            systemModules = SystemModuleFinder.getInstance();
-        } else {
-            systemModules = ModuleFinder.ofSystem();
-        }
+        ModuleFinder systemModules = ModuleFinder.ofSystem();
 
         PerfCounters.systemModulesTime.addElapsedTimeFrom(t0);