JDK-6991380 : (cal) Calendar.cachedLocaleData should be transitioned from Hashtable to ConcurrentHashMap
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 6u31,6-pool
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-10-12
  • Updated: 2012-02-14
  • Resolved: 2011-05-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u27Fixed 7 b118Fixed
Related Reports
Duplicate :  
Description
Calendar.cachedLocaleData is defined as a static Hashtable<Locale, int[]>(3).  cachedLocaleData is accessed upon every Calender object allocation, i.e. via Calendar constructor.  Hence, an application with high Calendar object allocations may experience lock contention since cachedLocaleData is shared across all Calendar object instances.

Hence, cachedLocaleData should be migrated to a static ConcurrentHashMap<Locale, int[]>(3) to help elide lock contention.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/build/jdk/rev/4a29a9ff158c
04-12-2010

EVALUATION Similar problems in the following classes are fixed. src/share/classes/java/text/DateFormatSymbols.java src/share/classes/java/text/DecimalFormat.java src/share/classes/java/text/SimpleDateFormat.java In addition, the cache control of DateFormatSymbols gets improved.
18-10-2010

EVALUATION In addition, TimeZone.cachedLocaleData should be removed.
14-10-2010

EVALUATION Hashtable will be replaced with ConcurrentHashMap.
13-10-2010