United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6991380 (cal) Calendar.cachedLocaleData should be transitioned from Hashtable to ConcurrentHashMap
JDK-6991380 : (cal) Calendar.cachedLocaleData should be transitioned from Hashtable to ConcurrentHashMap

Details
Type:
Enhancement
Submit Date:
2010-10-12
Status:
Closed
Updated Date:
2012-02-14
Project Name:
JDK
Resolved Date:
2011-05-18
Component:
core-libs
OS:
generic
Sub-Component:
java.util:i18n
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u31,6-pool
Fixed Versions:

Related Reports
Backport:
Duplicate:

Sub Tasks

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

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

In addition, TimeZone.cachedLocaleData should be removed.
                                     
2010-10-14
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.
                                     
2010-10-18
EVALUATION

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



Hardware and Software, Engineered to Work Together