]> granicus.if.org Git - icu/commitdiff
ICU-9929 fix RuleBasedCollator initialization of reorder codes (must go after init...
authorMarkus Scherer <markus.icu@gmail.com>
Fri, 22 Feb 2013 23:43:17 +0000 (23:43 +0000)
committerMarkus Scherer <markus.icu@gmail.com>
Fri, 22 Feb 2013 23:43:17 +0000 (23:43 +0000)
X-SVN-Rev: 33309

icu4j/main/classes/collate/src/com/ibm/icu/text/RuleBasedCollator.java
icu4j/main/shared/data/icudata.jar
icu4j/main/tests/collate/src/com/ibm/icu/dev/test/collator/AlphabeticIndexTest.java

index 08bb4b4725ccd31275b3574a749589cc389f73e6..158a8eb46ca240f4059568ee4e2716fd3b3786da 100644 (file)
@@ -2058,8 +2058,8 @@ public final class RuleBasedCollator extends Collator {
     }
 
     /**
-     * Constructors a RuleBasedCollator from the argument locale. If no resource bundle is associated with the locale,
-     * UCA is used instead.
+     * Constructs a RuleBasedCollator from the argument locale.
+     * If no resource bundle is associated with the locale, UCA is used instead.
      * 
      * @param locale
      */
@@ -2113,6 +2113,7 @@ public final class RuleBasedCollator extends Collator {
                         init(m_rules_);
                         return;
                     }
+                    init();
                     try {
                         UResourceBundle reorderRes = elements.get("%%ReorderCodes");
                         if (reorderRes != null) {
@@ -2123,7 +2124,6 @@ public final class RuleBasedCollator extends Collator {
                     } catch (MissingResourceException e) {
                         // ignore
                     }
-                    init();
                     return;
                 } else {
                     init(m_rules_);
index 04489ef6ef04afca4702111da774b692ae4d2d51..b09dbe7bafa4677221f10eed1772a1a4caac410e 100755 (executable)
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:960b8143979e8c6f000fa0e460a8aa9301188ebca4ebf1401bb6756e87ca7370
-size 9901367
+oid sha256:1271f8ebcfce1cb24f71d2090314d92fe7dcce5ea345f1c4862f0dd19cdfe28a
+size 9901544
index 0187675cb6896782b6d9dfe98173ae5ac5935eee..d03ad408d6bc7453550f3b3973cf17ca76f4422d 100644 (file)
@@ -224,7 +224,8 @@ public class AlphabeticIndexTest extends TestFmwk {
             List labels = alphabeticIndex.getBucketLabels();
             logln(labels.toString());
             Bucket<Integer> bucket = find(alphabeticIndex, probe);
-            assertEquals(probe + " found in right bucket", expectedLabel, bucket.getLabel());
+            assertEquals("locale " + test[0] + " name=" + probe + " in bucket",
+                    expectedLabel, bucket.getLabel());
         }
     }