You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2013/05/16 23:09:08 UTC

svn commit: r1483568 - in /commons/proper/lang/trunk/src: changes/changes.xml main/java/org/apache/commons/lang3/time/FastDateParser.java

Author: tn
Date: Thu May 16 21:09:07 2013
New Revision: 1483568

URL: http://svn.apache.org/r1483568
Log:
[LANG-887] Use the cache in FastDateParser correctly.

Modified:
    commons/proper/lang/trunk/src/changes/changes.xml
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateParser.java

Modified: commons/proper/lang/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/changes/changes.xml?rev=1483568&r1=1483567&r2=1483568&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/changes/changes.xml (original)
+++ commons/proper/lang/trunk/src/changes/changes.xml Thu May 16 21:09:07 2013
@@ -22,6 +22,7 @@
   <body>
 
   <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-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>  

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateParser.java?rev=1483568&r1=1483567&r2=1483568&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateParser.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateParser.java Thu May 16 21:09:07 2013
@@ -497,7 +497,7 @@ public class FastDateParser implements D
      */
     private Strategy getLocaleSpecificStrategy(final int field, final Calendar definingCalendar) {
         final ConcurrentMap<Locale,Strategy> 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)