Duplicate :
|
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.
|