Suppress warning, we only assign the variable to make sure the expected exception is thrown

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1479662 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benedikt Ritter 2013-05-06 18:02:27 +00:00
parent 1a7e46f430
commit 442eb55948
1 changed files with 2 additions and 1 deletions

View File

@ -215,7 +215,8 @@ public class SerializationUtilsTest {
final String value = "Hello";
final byte[] serialized = SerializationUtils.serialize(value);
Assert.assertEquals(value, SerializationUtils.deserialize(serialized));
// Causes ClassCastException in call site, not in SerializationUtils.deserialize
// Causes ClassCastException in call site, not in SerializationUtils.deserialize
@SuppressWarnings("unused") // needed to cause Exception
final Integer i = SerializationUtils.deserialize(serialized);
}