< prev index next >

src/java.base/share/classes/jdk/internal/loader/BuiltinClassLoader.java

Print this page
rev 55958 : 8229407: Avoid ConcurrentHashMap resizes during bootstrap
Reviewed-by: alanb

@@ -181,11 +181,11 @@
         super(name, parent == null || parent == ClassLoaders.bootLoader() ? null : parent);
 
         this.parent = parent;
         this.ucp = ucp;
 
-        this.nameToModule = new ConcurrentHashMap<>();
+        this.nameToModule = new ConcurrentHashMap<>(32);
         this.moduleToReader = new ConcurrentHashMap<>();
     }
 
     /**
      * Returns {@code true} if there is a class path associated with this
< prev index next >