]> granicus.if.org Git - icu/commitdiff
ICU-12739 Fixed new compiler warnings introduced last week.
authorYoshito Umaoka <y.umaoka@gmail.com>
Mon, 26 Sep 2016 14:37:26 +0000 (14:37 +0000)
committerYoshito Umaoka <y.umaoka@gmail.com>
Mon, 26 Sep 2016 14:37:26 +0000 (14:37 +0000)
X-SVN-Rev: 39348

icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/CompactDecimalFormatTest.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/TimeZoneFormatTest.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/CurrencyTest.java
icu4j/main/tests/core/src/com/ibm/icu/text/DigitListTest.java

index d497c04d0a9df1e0e404f6d0b22e705021125a83..ac2ce2848b81d1ae182d8174cd8a0f17dda9d4a7 100644 (file)
@@ -279,9 +279,9 @@ public class CompactDecimalFormatTest extends TestFmwk {
                 1000000000000L, 1000000000000L, 1000000000000L};
         long[] divisors_err = new long[] {
                 0,0,0,
-                13, 13, 13, 
-                1000000, 1000000, 1000000, 
-                1000000000L, 1000000000L, 1000000000L, 
+                13, 13, 13,
+                1000000, 1000000, 1000000,
+                1000000000L, 1000000000L, 1000000000L,
                 1000000000000L, 1000000000000L, 1000000000000L};
         checkCore(affixes, null, divisors, TestACoreCompactFormatList);
         checkCore(affixes, currencyAffixes, divisors, TestACoreCompactFormatListCurrency);
@@ -438,7 +438,7 @@ public class CompactDecimalFormatTest extends TestFmwk {
         assertEquals("BigDecimal format wrong: ", "31,000,000,000,000 trillion",
                      cdf.format(source_dec));
     }
-      
+
     @Test
     public void TestParsing() {
         CompactDecimalFormat cdf = CompactDecimalFormat.getInstance(
@@ -514,20 +514,19 @@ public class CompactDecimalFormatTest extends TestFmwk {
     public void TestReadObject() throws IOException, ClassNotFoundException {
         FileInputStream fi_stream = new FileInputStream("tmp.ser");
         ObjectInputStream objinstream = new ObjectInputStream(fi_stream);
-        CompactDecimalFormat cdf = CompactDecimalFormat.getInstance(
-                ULocale.ENGLISH, CompactStyle.LONG);
 
-        try{
+        try {
+            @SuppressWarnings("unused")
             CompactDecimalFormat cmpctDF = (CompactDecimalFormat) objinstream.readObject();
-            } catch (NotSerializableException e) {
+        } catch (NotSerializableException e) {
                 // Exception expected, thus return.
                 objinstream.close();
                 return;
-            }
-            objinstream.close();
-            fail("readObject currently unsupported, expected invokation to fail but passed");
+        }
+        objinstream.close();
+        fail("readObject currently unsupported, expected invokation to fail but passed");
     }
-    
+
     @Test
     public void TestBug12422() {
         CompactDecimalFormat cdf;
index ba198d1de82eb08553c942eb71a6d6c017334a66..dce3ab0e8afb5ab4703392c39e81d5fc51554a85 100644 (file)
@@ -1179,6 +1179,8 @@ public class TimeZoneFormatTest extends com.ibm.icu.dev.test.TestFmwk {
     }
 
     class TimeZoneNamesInheriter extends TimeZoneNames {
+        private static final long serialVersionUID = 1L;
+
         @Override
         public Set<String> getAvailableMetaZoneIDs() {
             return null;
index 5f48824dc4cc2942e02e5cd830776b252f1a13bb..ba73d5b475b36f7bca46dc533de8cba73534b556 100644 (file)
@@ -443,15 +443,15 @@ public class CurrencyTest extends TestFmwk {
 
         // Deutschmark available from first millisecond on
         assertEquals("Millisecond of DEM Big Bang", 1,
-                     metainfo.currencyInfo(filter.onDate(demFirstDate).withRegion("DE")).size());
+                     metainfo.currencyInfo(CurrencyFilter.onDate(demFirstDate).withRegion("DE")).size());
 
         assertEquals("From Deutschmark to Euro", 2,
-                     metainfo.currencyInfo(filter.onDateRange(demFirstDate, eurFirstDate).withRegion("DE")).size());
+                     metainfo.currencyInfo(CurrencyFilter.onDateRange(demFirstDate, eurFirstDate).withRegion("DE")).size());
 
         assertEquals("all Tender for Brazil", 7,
-                metainfo.currencyInfo(filter_br.onTender().withRegion("BR")).size());
+                metainfo.currencyInfo(CurrencyFilter.onTender().withRegion("BR")).size());
 
-        assertTrue("No legal tender", demInfo.isTender());        
+        assertTrue("No legal tender", demInfo.isTender());
     }
 
     @Test
@@ -809,7 +809,7 @@ public class CurrencyTest extends TestFmwk {
             assertEquals("getDisplayName() for " + data[0] + " in locale " + root, data[0], cur.getDisplayName(root));
         }
     }
-    
+
     @Test
     public void TestCurrencyInfoCtor() {
         new CurrencyMetaInfo.CurrencyInfo("region", "code", 0, 0, 1);
@@ -835,7 +835,6 @@ public class CurrencyTest extends TestFmwk {
     public void TestCurrMetaInfoBaseClass() {
         CurrencyFilter usFilter = CurrencyFilter.onRegion("US");
 
-        List<CurrencyInfo> listCurrInfo =  tcurrMetaInfo.currencyInfo(usFilter);
         assertEquals("Empty list expected", 0, tcurrMetaInfo.currencyInfo(usFilter).size());
         assertEquals("Empty list expected", 0, tcurrMetaInfo.currencies(usFilter).size());
         assertEquals("Empty list expected", 0, tcurrMetaInfo.regions(usFilter).size());
index 7e1284d4be92be1461c13fb81d9a50ee72e61a77..cc385f8889b1e30b1494281ea4b9796de44718e6 100644 (file)
@@ -7,9 +7,6 @@ import org.junit.Before;
 import org.junit.Test;
 
 import com.ibm.icu.dev.test.TestFmwk;
-import com.ibm.icu.dev.test.TestUtil;
-import com.ibm.icu.text.DigitList;
-import com.ibm.icu.text.NumberFormat;
 
 
 public class DigitListTest extends TestFmwk {