src/share/classes/java/util/TimeZone.java

Print this page
rev 6352 : imported patch 7162007

@@ -428,38 +428,13 @@
         private DisplayNames() {
         }
     }
 
     private static String[] getDisplayNames(String id, Locale locale) {
-        Map<String, SoftReference<Map<Locale, String[]>>> displayNames = DisplayNames.CACHE;
-
-        SoftReference<Map<Locale, String[]>> ref = displayNames.get(id);
-        if (ref != null) {
-            Map<Locale, String[]> perLocale = ref.get();
-            if (perLocale != null) {
-                String[] names = perLocale.get(locale);
-                if (names != null) {
-                    return names;
+        return TimeZoneNameUtility.retrieveDisplayNames(id, locale);
                 }
-                names = TimeZoneNameUtility.retrieveDisplayNames(id, locale);
-                if (names != null) {
-                    perLocale.put(locale, names);
-                }
-                return names;
-            }
-        }
 
-        String[] names = TimeZoneNameUtility.retrieveDisplayNames(id, locale);
-        if (names != null) {
-            Map<Locale, String[]> perLocale = new ConcurrentHashMap<>();
-            perLocale.put(locale, names);
-            ref = new SoftReference<>(perLocale);
-            displayNames.put(id, ref);
-        }
-        return names;
-    }
-
     /**
      * Returns the amount of time to be added to local standard time
      * to get local wall clock time.
      *
      * <p>The default implementation returns 3600000 milliseconds