diff --git a/src/changes/changes.xml b/src/changes/changes.xml index ce51d08c9..3c6f46d96 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -22,6 +22,7 @@ + FastDateFormat does not use the locale specific cache correctly Simplify FastDateFormat; eliminate boxing LookupTranslator now works with implementations of CharSequence other than String ClassUtils.getShortName(String) will now only do a reverse lookup for array types diff --git a/src/main/java/org/apache/commons/lang3/time/FastDateParser.java b/src/main/java/org/apache/commons/lang3/time/FastDateParser.java index 8fa03289b..b9bb413b5 100644 --- a/src/main/java/org/apache/commons/lang3/time/FastDateParser.java +++ b/src/main/java/org/apache/commons/lang3/time/FastDateParser.java @@ -497,7 +497,7 @@ private static ConcurrentMap getCache(final int field) { */ private Strategy getLocaleSpecificStrategy(final int field, final Calendar definingCalendar) { final ConcurrentMap cache = getCache(field); - Strategy strategy= cache.get(Integer.valueOf(field)); + Strategy strategy= cache.get(locale); if(strategy==null) { strategy= field==Calendar.ZONE_OFFSET ? new TimeZoneStrategy(locale)