< prev index next >

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

Print this page
rev 54380 : 8221701: Archive constant BaseLocales
Reviewed-by: naoto

@@ -42,10 +42,11 @@
 
 import java.lang.ref.ReferenceQueue;
 import java.lang.ref.SoftReference;
 import java.text.MessageFormat;
 import java.text.NumberFormat;
+import java.util.Arrays;
 import java.util.Calendar;
 import java.util.HashSet;
 import java.util.LinkedHashSet;
 import java.util.Locale;
 import java.util.Map;

@@ -323,11 +324,11 @@
     String[][] getZoneStrings() {
         TimeZoneNamesBundle rb = localeData.getTimeZoneNames(locale);
         Set<String> keyset = getZoneIDs();
         // Use a LinkedHashSet to preseve the order
         Set<String[]> value = new LinkedHashSet<>();
-        Set<String> tzIds = new HashSet<>(Set.of(TimeZone.getAvailableIDs()));
+        Set<String> tzIds = new HashSet<>(Arrays.asList(TimeZone.getAvailableIDs()));
         for (String key : keyset) {
             if (!key.startsWith(TZNB_EXCITY_PREFIX)) {
                 value.add(rb.getStringArray(key));
                 tzIds.remove(key);
             }
< prev index next >