]> granicus.if.org Git - icu/commitdiff
ICU-9101 Fixed some compiler warnings reported by javac in JDK - redundant type cast.
authorYoshito Umaoka <y.umaoka@gmail.com>
Tue, 4 Mar 2014 19:44:48 +0000 (19:44 +0000)
committerYoshito Umaoka <y.umaoka@gmail.com>
Tue, 4 Mar 2014 19:44:48 +0000 (19:44 +0000)
X-SVN-Rev: 35332

icu4j/main/classes/collate/src/com/ibm/icu/impl/coll/CollationBuilder.java
icu4j/main/classes/collate/src/com/ibm/icu/text/AlphabeticIndex.java

index 54ea9fe1daae9efe6d9194bec9c47ae83b3c15f6..bfd3fcae0f4b2c173cdbe9b3eb2520075465723c 100644 (file)
@@ -1356,9 +1356,9 @@ public final class CollationBuilder extends CollationRuleParser.Sink {
     private static int indexFromTempCE32(int tempCE32) {
         tempCE32 -= 0x40400620;
         return
-            ((int)(tempCE32 >> 11) & 0xfe000) |
-            ((int)(tempCE32 >> 10) & 0x1fc0) |
-            ((int)(tempCE32 >> 8) & 0x3f);
+            ((tempCE32 >> 11) & 0xfe000) |
+            ((tempCE32 >> 10) & 0x1fc0) |
+            ((tempCE32 >> 8) & 0x3f);
     }
     private static boolean isTempCE32(int ce32) {
         return
index 3fba10301f88034334d86d5e8bc48071aaa8eb39..60e4bfb87d774266a2a880daae293d6655043fb6 100644 (file)
@@ -272,7 +272,7 @@ public final class AlphabeticIndex<V> implements Iterable<Bucket<V>> {
     private AlphabeticIndex(ULocale locale, RuleBasedCollator collator) {
         collatorOriginal = collator != null ? collator : (RuleBasedCollator) Collator.getInstance(locale);
         try {
-            collatorPrimaryOnly = (RuleBasedCollator) (collatorOriginal.cloneAsThawed());
+            collatorPrimaryOnly = collatorOriginal.cloneAsThawed();
         } catch (Exception e) {
             // should never happen
             throw new IllegalStateException("Collator cannot be cloned", e);