]> granicus.if.org Git - icu/commitdiff
ICU-8268 repeated conditional test
authorAbhinav Gupta <mail@abhinavg.net>
Tue, 27 Sep 2011 18:15:03 +0000 (18:15 +0000)
committerAbhinav Gupta <mail@abhinavg.net>
Tue, 27 Sep 2011 18:15:03 +0000 (18:15 +0000)
X-SVN-Rev: 30718

icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetCompoundText.java
icu4j/main/classes/currdata/src/com/ibm/icu/impl/ICUCurrencyDisplayInfoProvider.java

index d0647915160ff9fc0a162c2ab7931d01ac9c433d..5e33e5dd4dd5e494f5b32247ab6182b0a191e0e8 100644 (file)
@@ -150,15 +150,12 @@ class CharsetCompoundText extends CharsetICU {
     }
     
     private static boolean isIBM912(int codepoint) {
-        if ((codepoint >= 0x0102 && codepoint <= 0x0107) || (codepoint >= 0x010C && codepoint <= 0x0111) || (codepoint >= 0x0118 && codepoint <= 0x011B) ||
-                (codepoint == 0x0139) || (codepoint == 0x013A) || (codepoint == 0x013D) || (codepoint == 0x013E) || (codepoint >= 0x0141 && codepoint <= 0x0144) ||
-                (codepoint == 0x0147) || (codepoint == 0x0147) || (codepoint == 0x0150) || (codepoint == 0x0151) || (codepoint == 0x0154) || (codepoint == 0x0155) || 
-                (codepoint >= 0x0158 && codepoint <= 0x015B) || (codepoint == 0x015E) || (codepoint == 0x015F) || (codepoint >= 0x0160 && codepoint <= 0x0165) ||
+        return ((codepoint >= 0x0102  && codepoint <= 0x0107)  || (codepoint >= 0x010C && codepoint <= 0x0111)    || (codepoint >= 0x0118 && codepoint <= 0x011B) ||
+                (codepoint == 0x0139) || (codepoint == 0x013A) || (codepoint == 0x013D) || (codepoint == 0x013E)  || (codepoint >= 0x0141 && codepoint <= 0x0144) ||
+                (codepoint == 0x0147) || (codepoint == 0x0150) || (codepoint == 0x0151) || (codepoint == 0x0154)  || (codepoint == 0x0155)                        ||
+                (codepoint >= 0x0158  && codepoint <= 0x015B)  || (codepoint == 0x015E) || (codepoint == 0x015F)  || (codepoint >= 0x0160 && codepoint <= 0x0165) ||
                 (codepoint == 0x016E) || (codepoint == 0x016F) || (codepoint == 0x0170) || (codepoint ==  0x0171) || (codepoint >= 0x0179 && codepoint <= 0x017E) ||
-                (codepoint == 0x02C7) || (codepoint == 0x02D8) || (codepoint == 0x02D9) || (codepoint == 0x02DB) || (codepoint == 0x02DD)) {
-            return true;
-        }
-        return false;
+                (codepoint == 0x02C7) || (codepoint == 0x02D8) || (codepoint == 0x02D9) || (codepoint == 0x02DB)  || (codepoint == 0x02DD));
     }
     
     private static boolean isIBM913(int codepoint) {
index 821b073f944636108567100b3230c44f9c84636c..a825f980fca363a56bf8cf8690bd813ebb8e909d 100644 (file)
@@ -185,7 +185,7 @@ public class ICUCurrencyDisplayInfoProvider implements CurrencyDisplayInfoProvid
             if (srb != null) {
                 ICUResourceBundle brb = srb.findWithFallback("beforeCurrency");
                 ICUResourceBundle arb = srb.findWithFallback("afterCurrency");
-                if (brb != null && brb != null) {
+                if (brb != null) {
                     String beforeCurrencyMatch = brb.findWithFallback("currencyMatch").getString();
                     String beforeContextMatch = brb.findWithFallback("surroundingMatch").getString();
                     String beforeInsert = brb.findWithFallback("insertBetween").getString();