]> granicus.if.org Git - icu/commitdiff
ICU-13581 Fixed Java compiler warnings on Eclipse.
authorYoshito Umaoka <y.umaoka@gmail.com>
Wed, 28 Feb 2018 23:12:21 +0000 (23:12 +0000)
committerYoshito Umaoka <y.umaoka@gmail.com>
Wed, 28 Feb 2018 23:12:21 +0000 (23:12 +0000)
X-SVN-Rev: 41020

icu4j/main/classes/core/src/com/ibm/icu/impl/Utility.java
icu4j/main/classes/core/src/com/ibm/icu/text/BreakIterator.java
icu4j/main/classes/core/src/com/ibm/icu/text/DateTimePatternGenerator.java
icu4j/main/classes/core/src/com/ibm/icu/text/DictionaryBreakEngine.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/number/DecimalQuantityTest.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/XLocaleDistanceTest.java

index db10b2569d19d1db657fb2f458b31c69f4ee04f1..170088ed48c63aae572c7754eb3304c03269a125 100644 (file)
@@ -1850,7 +1850,7 @@ public final class Utility {
     }
 
     /**
-     * This implementation is equivalent to Java 8+ {@link Math#addExact(int, int)}
+     * This implementation is equivalent to Java 8+ Math#addExact(int, int)
      * @param x the first value
      * @param y the second value
      * @return the result
index 767dd08cf9514f64af1c5075ce7e6018eaef01c0..a8a953ba901fe460941a5108f51f5a6688981849 100644 (file)
@@ -882,9 +882,6 @@ s     */
 
         BreakIteratorCache cache = new BreakIteratorCache(where, result);
         iterCache[kind] = CacheValue.getInstance(cache);
-        if (result instanceof RuleBasedBreakIterator) {
-            RuleBasedBreakIterator rbbi = (RuleBasedBreakIterator)result;
-        }
 
         return result;
     }
index 52a9ae819c8d2df11f1c8cc0d14ffb53d12b3bc8..2378846f761550f3a25e7ad731a160ed122dc801 100644 (file)
@@ -1147,6 +1147,7 @@ public class DateTimePatternGenerator implements Freezable<DateTimePatternGenera
          * @internal
          * @deprecated This API is ICU internal only.
          */
+        @Deprecated
         private static int COUNT = DisplayWidth.values().length;
         private final String cldrKey;
         DisplayWidth(String cldrKey) {
@@ -1156,7 +1157,7 @@ public class DateTimePatternGenerator implements Freezable<DateTimePatternGenera
             return cldrKey;
         }
     }
-    
+
     /**
      * The field name width for use in appendItems
      */
@@ -1265,7 +1266,7 @@ public class DateTimePatternGenerator implements Freezable<DateTimePatternGenera
      *
      * @param field The index to get the append item name.
      * @return name for field
-     * @see getFieldDisplayName
+     * @see #getFieldDisplayName(int, DisplayWidth)
      * @stable ICU 3.6
      */
     public String getAppendItemName(int field) {
@@ -1282,6 +1283,7 @@ public class DateTimePatternGenerator implements Freezable<DateTimePatternGenera
      * @internal
      * @deprecated This API is ICU internal only.
      */
+    @Deprecated
     private void setFieldDisplayName(int field, DisplayWidth width, String value) {
         checkFrozen();
         if (field < TYPE_LIMIT && field >= 0) {
index 29905cd752322c1d03a59e08f33b8ef0a7acc4ec..baee31935afdc1b5173b2d582bedf37f9c0cf81b 100644 (file)
@@ -9,7 +9,6 @@
 package com.ibm.icu.text;
 
 import java.text.CharacterIterator;
-import java.util.BitSet;
 
 import com.ibm.icu.impl.CharacterIteration;
 
index aedc8cddf04db2202eff325bd0f2a239b310e008..2e8c2ad7610f538145d2eb9e43d191509aa5cc37 100644 (file)
@@ -176,6 +176,7 @@ public class DecimalQuantityTest extends TestFmwk {
 
     private static final MathContext MATH_CONTEXT_HALF_EVEN = new MathContext(0, RoundingMode.HALF_EVEN);
     private static final MathContext MATH_CONTEXT_CEILING = new MathContext(0, RoundingMode.CEILING);
+    @SuppressWarnings("unused")
     private static final MathContext MATH_CONTEXT_FLOOR = new MathContext(0, RoundingMode.FLOOR);
     private static final MathContext MATH_CONTEXT_PRECISION = new MathContext(3, RoundingMode.HALF_UP);
 
index ce8cb8b1e6d8df985ce8673c59cccb1e42c27b1c..9f331e26ebf561314ca4ccdebd5e95582ccb6f10 100644 (file)
@@ -54,6 +54,7 @@ public class XLocaleDistanceTest extends TestFmwk {
         }
     }
 
+    @SuppressWarnings("unused")
     @Ignore("Disabled because of Linux; need to investigate.")
     @Test
     public void testTiming() {