This appears to be a leftover of the cache cleanup activity. The fix
looks good to me.
Masayoshi
On 6/23/2013 12:34 AM, Alan Bateman wrote:
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);
}