]> granicus.if.org Git - icu/commitdiff
ICU-11879 DateFormatSymbols.getZoneStrings() use new, fast, public-@internal TimeZone...
authorMarkus Scherer <markus.icu@gmail.com>
Thu, 3 Sep 2015 18:08:16 +0000 (18:08 +0000)
committerMarkus Scherer <markus.icu@gmail.com>
Thu, 3 Sep 2015 18:08:16 +0000 (18:08 +0000)
X-SVN-Rev: 37876

icu4j/main/classes/core/src/com/ibm/icu/text/DateFormatSymbols.java

index f10bef198ee5407c0ddf215261290b46d4242001..bc7ab35975adc6fef4686348e14f8b9531eb2108 100644 (file)
@@ -1309,6 +1309,11 @@ public class DateFormatSymbols implements Serializable, Cloneable {
 
         String[] tzIDs = TimeZone.getAvailableIDs();
         TimeZoneNames tznames = TimeZoneNames.getInstance(validLocale);
+        tznames.loadAllDisplayNames();
+        NameType types[] = {
+            NameType.LONG_STANDARD, NameType.SHORT_STANDARD,
+            NameType.LONG_DAYLIGHT, NameType.SHORT_DAYLIGHT
+        };
         long now = System.currentTimeMillis();
         String[][] array = new String[tzIDs.length][5];
         for (int i = 0; i < tzIDs.length; i++) {
@@ -1318,10 +1323,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
             }
 
             array[i][0] = tzIDs[i];
-            array[i][1] = tznames.getDisplayName(canonicalID, NameType.LONG_STANDARD, now);
-            array[i][2] = tznames.getDisplayName(canonicalID, NameType.SHORT_STANDARD, now);
-            array[i][3] = tznames.getDisplayName(canonicalID, NameType.LONG_DAYLIGHT, now);
-            array[i][4] = tznames.getDisplayName(canonicalID, NameType.SHORT_DAYLIGHT, now);
+            tznames.getDisplayNames(canonicalID, types, now, array[i], 1);
         }
 
         zoneStrings = array;