<i18n dev> TimeZone.DispayNames - remove it?

Alan Bateman Alan.Bateman at oracle.com
Sat Jun 22 08:34:34 PDT 2013


While snooping around in java.util.TimeZone I came across DisplayNames 
which doesn't appear to be be used anymore as the display cache is moved 
to TimeZoneNameUtility. Any objection if I remove it via the attached 
patched? The JDK builds without it and I am confident it is not used 
anywhere.

-Alan


diff --git a/src/share/classes/java/util/TimeZone.java 
b/src/share/classes/java/util/TimeZone.java
--- a/src/share/classes/java/util/TimeZone.java
+++ b/src/share/classes/java/util/TimeZone.java
@@ -419,17 +419,6 @@
          return ZoneInfoFile.toCustomID(offset);
      }

-    private static class DisplayNames {
-        // Cache for managing display names per timezone per locale
-        // The structure is:
-        //   Map(key=id, value=SoftReference(Map(key=locale, 
value=displaynames)))
-        private static final Map<String, SoftReference<Map<Locale, 
String[]>>> CACHE =
-            new ConcurrentHashMap<>();
-
-        private DisplayNames() {
-        }
-    }
-
      private static String[] getDisplayNames(String id, Locale locale) {
          return TimeZoneNameUtility.retrieveDisplayNames(id, locale);
      }


More information about the i18n-dev mailing list