You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2009/04/16 09:28:13 UTC
svn commit: r765489 -
/myfaces/trinidad/branches/1.2.11.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java
Author: matzew
Date: Thu Apr 16 07:28:13 2009
New Revision: 765489
URL: http://svn.apache.org/viewvc?rev=765489&view=rev
Log:
TRINIDAD-1455 - NumberConverter caches only the first encountered converter for a given type. Converters for other locales are recreated every time
Thanks to Max Starets for the patch
Modified:
myfaces/trinidad/branches/1.2.11.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java
Modified: myfaces/trinidad/branches/1.2.11.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.11.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java?rev=765489&r1=765488&r2=765489&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.11.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java (original)
+++ myfaces/trinidad/branches/1.2.11.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java Thu Apr 16 07:28:13 2009
@@ -981,11 +981,11 @@
if (nfMap == null)
{
nfMap = new HashMap<Locale, NumberFormat>();
- nfMap.put(locale, (NumberFormat)format.clone());
+ _numberFormatHolder.put(key, nfMap);
}
// add this based on the type ('number','currency','percent') or
// pattern1, pattern2.. patternN to the main holder
- _numberFormatHolder.put(key, nfMap);
+ nfMap.put(locale, (NumberFormat)format.clone());
}
}
}