[LANG-887] Use the cache in FastDateParser correctly.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1483568 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8ef33a43ec
commit
03b4f61f14
|
@ -22,6 +22,7 @@
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<release version="3.2" date="TBA" description="Next release">
|
<release version="3.2" date="TBA" description="Next release">
|
||||||
|
<action issue="LANG-887" type="fix">FastDateFormat does not use the locale specific cache correctly</action>
|
||||||
<action issue="LANG-884" type="update">Simplify FastDateFormat; eliminate boxing</action>
|
<action issue="LANG-884" type="update">Simplify FastDateFormat; eliminate boxing</action>
|
||||||
<action issue="LANG-882" type="update">LookupTranslator now works with implementations of CharSequence other than String</action>
|
<action issue="LANG-882" type="update">LookupTranslator now works with implementations of CharSequence other than String</action>
|
||||||
<action issue="LANG-754" type="fix">ClassUtils.getShortName(String) will now only do a reverse lookup for array types</action>
|
<action issue="LANG-754" type="fix">ClassUtils.getShortName(String) will now only do a reverse lookup for array types</action>
|
||||||
|
|
|
@ -497,7 +497,7 @@ public class FastDateParser implements DateParser, Serializable {
|
||||||
*/
|
*/
|
||||||
private Strategy getLocaleSpecificStrategy(final int field, final Calendar definingCalendar) {
|
private Strategy getLocaleSpecificStrategy(final int field, final Calendar definingCalendar) {
|
||||||
final ConcurrentMap<Locale,Strategy> cache = getCache(field);
|
final ConcurrentMap<Locale,Strategy> cache = getCache(field);
|
||||||
Strategy strategy= cache.get(Integer.valueOf(field));
|
Strategy strategy= cache.get(locale);
|
||||||
if(strategy==null) {
|
if(strategy==null) {
|
||||||
strategy= field==Calendar.ZONE_OFFSET
|
strategy= field==Calendar.ZONE_OFFSET
|
||||||
? new TimeZoneStrategy(locale)
|
? new TimeZoneStrategy(locale)
|
||||||
|
|
Loading…
Reference in New Issue