Suppress warnings

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@754538 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2009-03-14 21:55:11 +00:00
parent eaac4a7df7
commit fd0deef560
2 changed files with 4 additions and 0 deletions

View File

@ -159,6 +159,7 @@ public class SerializationUtilsTest extends TestCase {
} }
public void testSerializeStreamObjNull() throws Exception { public void testSerializeStreamObjNull() throws Exception {
// TODO NOT USED - but should it be?
ByteArrayOutputStream streamTest = new ByteArrayOutputStream(); ByteArrayOutputStream streamTest = new ByteArrayOutputStream();
try { try {
SerializationUtils.serialize(iMap, null); SerializationUtils.serialize(iMap, null);
@ -169,6 +170,7 @@ public class SerializationUtilsTest extends TestCase {
} }
public void testSerializeStreamNullNull() throws Exception { public void testSerializeStreamNullNull() throws Exception {
// TODO NOT USED - but should it be?
ByteArrayOutputStream streamTest = new ByteArrayOutputStream(); ByteArrayOutputStream streamTest = new ByteArrayOutputStream();
try { try {
SerializationUtils.serialize(null, null); SerializationUtils.serialize(null, null);
@ -256,6 +258,7 @@ public class SerializationUtilsTest extends TestCase {
ByteArrayInputStream inTest = new ByteArrayInputStream(streamReal.toByteArray()); ByteArrayInputStream inTest = new ByteArrayInputStream(streamReal.toByteArray());
try { try {
@SuppressWarnings("unused")
Object test = SerializationUtils.deserialize(inTest); Object test = SerializationUtils.deserialize(inTest);
} catch(SerializationException se) { } catch(SerializationException se) {
assertEquals("java.lang.ClassNotFoundException: " + CLASS_NOT_FOUND_MESSAGE, se.getMessage()); assertEquals("java.lang.ClassNotFoundException: " + CLASS_NOT_FOUND_MESSAGE, se.getMessage());

View File

@ -1120,6 +1120,7 @@ public class NumberUtilsTest extends TestCase {
} }
} }
@SuppressWarnings("cast") // suppress instanceof warning check
public void testConstants() { public void testConstants() {
assertTrue(NumberUtils.LONG_ZERO instanceof Long); assertTrue(NumberUtils.LONG_ZERO instanceof Long);
assertTrue(NumberUtils.LONG_ONE instanceof Long); assertTrue(NumberUtils.LONG_ONE instanceof Long);