]> granicus.if.org Git - icu/commitdiff
ICU-8474 correct isEmpty()
authorMark Davis <mark@macchiato.com>
Tue, 9 Apr 2013 09:04:45 +0000 (09:04 +0000)
committerMark Davis <mark@macchiato.com>
Tue, 9 Apr 2013 09:04:45 +0000 (09:04 +0000)
X-SVN-Rev: 33501

icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/WritePluralRulesData.java
icu4j/main/tests/translit/src/com/ibm/icu/dev/util/UnicodeProperty.java

index 60e105f105c8ff4109ab74c1340aeffe50d4b911..c06f5516db7ac78d8e8ae34becdd70a46c623a11 100644 (file)
@@ -100,7 +100,7 @@ public class WritePluralRulesData {
                 boolean[] isAvailable = new boolean[1];
                 for (ULocale locale : locales) {
                     ULocale base = pluralRulesFactory.getFunctionalEquivalent(locale, isAvailable);
-                    if (!locales.contains(base) && !base.toString().isEmpty()) {
+                    if (!locales.contains(base) && base.toString().length() != 0) {
                         System.out.println("**" + locales + " doesn't contain " + base);
                     }
                 }
@@ -400,14 +400,14 @@ public class WritePluralRulesData {
                 String skeleton = sample.replace(" ", "").replace("{0}", "");
                 String oldSkeletonKeyword = skeletonToKeyword.get(skeleton);
                 if (oldSkeletonKeyword != null) {
-                    if (!error.isEmpty()) {
+                    if (error.length() != 0) {
                         error += ", ";
                     }
                     error += "Duplicate keyword skeleton <" + keyword + ", " + skeleton + ">, same as for: <" + oldSkeletonKeyword + ">";
                 } else {
                     skeletonToKeyword.put(skeleton, keyword);
                 }
-                if (error.isEmpty()) {
+                if (error.length() == 0) {
                     keywordToErrors.put(keyword, "");
                 } else {
                     keywordToErrors.put(keyword, "\tERROR: " + error);
index 9a2de6c9a9864fe084df2024205a1e266eca82d7..c4b23c1575e3d8157ec31a14ac9b3eaaef476d8e 100644 (file)
@@ -736,7 +736,7 @@ public abstract class UnicodeProperty extends UnicodeLabel {
 
         public final Factory add(UnicodeProperty sp) {
             String name2 = sp.getName();
-            if (name2.isEmpty()) {
+            if (name2.length() == 0) {
                 throw new IllegalArgumentException();
             }
             canonicalNames.put(name2, sp);