Re: i18n dev TimeZone.DispayNames - remove it?

2013-06-24 Thread Alan Bateman

On 24/06/2013 03:49, Masayoshi Okutsu wrote:
This appears to be a leftover of the cache cleanup activity. The fix 
looks good to me.


Masayoshi


Thanks. I've created 8017477 and will push this to jdk8/tl shortly.

-Alan



Re: i18n dev TimeZone.DispayNames - remove it?

2013-06-23 Thread Masayoshi Okutsu
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 MapString, SoftReferenceMapLocale, 
String[] CACHE =

-new ConcurrentHashMap();
-
-private DisplayNames() {
-}
-}
-
 private static String[] getDisplayNames(String id, Locale locale) {
 return TimeZoneNameUtility.retrieveDisplayNames(id, locale);
 }