mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-8474 correct isEmpty()
X-SVN-Rev: 33501
This commit is contained in:
parent
bc9b269353
commit
9c66e7e083
2 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue