8229407: Avoid ConcurrentHashMap resizes during bootstrap

Reviewed-by: alanb, shade, dfuchs
This commit is contained in:
Claes Redestad 2019-08-12 15:27:57 +02:00
parent 438c7a5dba
commit cfb3b64704
2 changed files with 2 additions and 2 deletions

View file

@ -183,7 +183,7 @@ public class BuiltinClassLoader
this.parent = parent; this.parent = parent;
this.ucp = ucp; this.ucp = ucp;
this.nameToModule = new ConcurrentHashMap<>(); this.nameToModule = new ConcurrentHashMap<>(32);
this.moduleToReader = new ConcurrentHashMap<>(); this.moduleToReader = new ConcurrentHashMap<>();
} }

View file

@ -81,7 +81,7 @@ public final class ServicesCatalog {
} }
// service name -> list of providers // service name -> list of providers
private final Map<String, List<ServiceProvider>> map = new ConcurrentHashMap<>(); private final Map<String, List<ServiceProvider>> map = new ConcurrentHashMap<>(32);
private ServicesCatalog() { } private ServicesCatalog() { }