]> granicus.if.org Git - icu/commitdiff
ICU-9132 no Locale.ROOT in Java 5
authorMarkus Scherer <markus.icu@gmail.com>
Mon, 16 Apr 2012 17:52:42 +0000 (17:52 +0000)
committerMarkus Scherer <markus.icu@gmail.com>
Mon, 16 Apr 2012 17:52:42 +0000 (17:52 +0000)
X-SVN-Rev: 31712

icu4j/main/classes/core/src/com/ibm/icu/text/MessagePattern.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/MessagePatternUtilTest.java

index 80b0889a11c79d27c1cffa0e9de2a24e67860342..767fc3baabca143847901e51c1c516d55d013a81 100644 (file)
@@ -1213,13 +1213,13 @@ public final class MessagePattern implements Cloneable, Freezable<MessagePattern
                 if(eos==inMessageFormatPattern(nestingLevel)) {
                     throw new IllegalArgumentException(
                         "Bad "+
-                        argType.toString().toLowerCase(Locale.ROOT)+
+                        argType.toString().toLowerCase(Locale.ENGLISH)+
                         " pattern syntax: "+prefix(start));
                 }
                 if(!hasOther) {
                     throw new IllegalArgumentException(
                         "Missing 'other' keyword in "+
-                        argType.toString().toLowerCase(Locale.ROOT)+
+                        argType.toString().toLowerCase(Locale.ENGLISH)+
                         " pattern in \""+prefix()+"\"");
                 }
                 return index;
@@ -1232,7 +1232,7 @@ public final class MessagePattern implements Cloneable, Freezable<MessagePattern
                 if(length==1) {
                     throw new IllegalArgumentException(
                         "Bad "+
-                        argType.toString().toLowerCase(Locale.ROOT)+
+                        argType.toString().toLowerCase(Locale.ENGLISH)+
                         " pattern syntax: "+prefix(start));
                 }
                 if(length>Part.MAX_LENGTH) {
@@ -1247,7 +1247,7 @@ public final class MessagePattern implements Cloneable, Freezable<MessagePattern
                 if(length==0) {
                     throw new IllegalArgumentException(
                         "Bad "+
-                        argType.toString().toLowerCase(Locale.ROOT)+
+                        argType.toString().toLowerCase(Locale.ENGLISH)+
                         " pattern syntax: "+prefix(start));
                 }
                 // Note: The ':' in "offset:" is just beyond the skipIdentifier() range.
@@ -1292,7 +1292,7 @@ public final class MessagePattern implements Cloneable, Freezable<MessagePattern
             if(index==msg.length() || msg.charAt(index)!='{') {
                 throw new IllegalArgumentException(
                     "No message fragment after "+
-                    argType.toString().toLowerCase(Locale.ROOT)+
+                    argType.toString().toLowerCase(Locale.ENGLISH)+
                     " selector: "+prefix(selectorIndex));
             }
             index=parseMessage(index, 1, nestingLevel+1, argType);
index 6573dd29a2302c61931ffbe3e5a6c9ff63b7ac63..f84a30c07b73268795eb60c2a19f8e970855b192 100644 (file)
@@ -184,7 +184,7 @@ public final class MessagePatternUtilTest extends com.ibm.icu.dev.test.TestFmwk
     private class ExpectComplexArgNode extends ExpectArgNode {
         private ExpectComplexArgNode(ExpectMessageNode parent,
                                      Object name, MessagePattern.ArgType argType) {
-            super(name, argType.toString().toLowerCase(Locale.ROOT));
+            super(name, argType.toString().toLowerCase(Locale.ENGLISH));
             this.argType = argType;
             this.parent = parent;
         }