sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1409061 - in /sis/branches/JDK7/sis-utility/src: main/java/org/apache/sis/util/resources/IndexedResourceBundle.java test/java/org/apache/sis/util/resources/IndexedResourceBundleTest.java
Date Wed, 14 Nov 2012 02:35:05 GMT
Author: desruisseaux
Date: Wed Nov 14 02:35:04 2012
New Revision: 1409061

URL: http://svn.apache.org/viewvc?rev=1409061&view=rev
Log:
Bug fix in IndexedResourceBundle: lastKey was not set on initial MessageFormat creation.

Modified:
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
    sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/resources/IndexedResourceBundleTest.java

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java?rev=1409061&r1=1409060&r2=1409061&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
(original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
Wed Nov 14 02:35:04 2012
@@ -554,6 +554,7 @@ public class IndexedResourceBundle exten
                  * Constructs a new MessageFormat for formatting the arguments.
                  */
                 format = new MessageFormat(pattern, getFormatLocale());
+                lastKey = key;
             } else if (key != lastKey) {
                 /*
                  * Method MessageFormat.applyPattern(...) is costly! We will avoid

Modified: sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/resources/IndexedResourceBundleTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/resources/IndexedResourceBundleTest.java?rev=1409061&r1=1409060&r2=1409061&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/resources/IndexedResourceBundleTest.java
(original)
+++ sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/resources/IndexedResourceBundleTest.java
Wed Nov 14 02:35:04 2012
@@ -187,8 +187,8 @@ public final strictfp class IndexedResou
     public void dumpResourcesOnError() throws IOException {
         if (testing != null) {
             final PrintStream err = System.err;
-            err.print("Error while testing IndexedResourceBundle for locale ");
-            err.print(testing.getLocale());
+            err.print("Error while testing ");
+            err.print(testing);
             err.println(". Bundle content is:");
             testing.list(err);
             err.flush();



Mime
View raw message