ICU-8474 correct isEmpty()

X-SVN-Rev: 33501
This commit is contained in:
Mark Davis 2013-04-09 09:04:45 +00:00
parent bc9b269353
commit 9c66e7e083
2 changed files with 4 additions and 4 deletions

View 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);

View 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);