ICU-12739 Fixed new compiler warnings introduced last week.

X-SVN-Rev: 39348
This commit is contained in:
Yoshito Umaoka 2016-09-26 14:37:26 +00:00
parent bea0b2961d
commit 4bbd8315bd
4 changed files with 18 additions and 21 deletions

View 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;

View 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;

View 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());

View 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 {