]> granicus.if.org Git - icu/commitdiff
ICU-20438 Fixed eclipse compiler warnings
authorYoshito Umaoka <yumaoka@users.noreply.github.com>
Sat, 23 Feb 2019 02:57:14 +0000 (21:57 -0500)
committerYoshito Umaoka <yumaoka@users.noreply.github.com>
Mon, 25 Feb 2019 15:04:47 +0000 (10:04 -0500)
icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/ListFormatterTest.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/RelativeDateTimeFormatterTest.java

index 7de396c0b8f2d6a12e60ab034d57ea56e964d3a8..2d0367f3f441b51fe362bea15f1cde78925b72b9 100644 (file)
@@ -148,7 +148,7 @@ public class ListFormatterTest extends TestFmwk {
     @Test
     public void TestFromList() {
         ListFormatter listFormatter = ListFormatter.getInstance(ULocale.ENGLISH);
-        ArrayList<String> list = new ArrayList<String>();
+        ArrayList<String> list = new ArrayList<>();
         list.add("A");
         list.add("B");
         list.add("C");
@@ -190,7 +190,7 @@ public class ListFormatterTest extends TestFmwk {
 
     void DoTheRealListStyleTesting(ULocale locale, String items[], ListFormatter.Style style, String expected) {
         ListFormatter listFormatter = ListFormatter.getInstance(locale, style);
-        assertEquals("Style \"" + style + "\"", expected, listFormatter.format(items));
+        assertEquals("Style \"" + style + "\"", expected, listFormatter.format((Object[])items));
     }
 
     @Test
index bada1be004993a2f0e066de97a0da77ed8296ad6..4c6d92c6a8d907feda48ee0ea2a68d45192bab89 100644 (file)
@@ -782,6 +782,7 @@ public class RelativeDateTimeFormatterTest extends TestFmwk {
             "+5 s",                 "+5 s",               /*  5   */
         };
 
+        @SuppressWarnings("unused")
         String[] enIN_decDef_short_midSent_weds = {
         /*  text                    numeric */
             "5 Wed. ago",           "5 Wed. ago",         /* -5   */