< prev index next >

src/java.base/share/classes/sun/util/locale/provider/JRELocaleProviderAdapter.java

Print this page
rev 59160 : [mq]: 8244459

@@ -443,11 +443,11 @@
         String supportedLocaleString = createSupportedLocaleString(category);
         if (supportedLocaleString == null) {
             return Collections.emptySet();
         }
         StringTokenizer tokens = new StringTokenizer(supportedLocaleString);
-        Set<String> tagset = new HashSet<>(Math.max((int)(tokens.countTokens() / 0.75f) + 1, 16));
+        Set<String> tagset = new HashSet<>(tokens.countTokens() * 4 + 2 / 3);
         while (tokens.hasMoreTokens()) {
             tagset.add(tokens.nextToken());
         }
 
         return tagset;
< prev index next >