Avoid class cast and unused var warnings [Eclipse]

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@753652 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2009-03-14 13:23:02 +00:00
parent 6c2ce661d9
commit 5b64c9177b
1 changed files with 2 additions and 1 deletions

View File

@ -335,7 +335,8 @@ public class ArrayUtilsTest extends TestCase {
assertNotSame("java.sql.Date type", java.sql.Date.class,
ArrayUtils.subarray(dateArray, 1, 4).getClass().getComponentType());
try {
Object dummy = (java.sql.Date[])ArrayUtils.subarray(dateArray, 1,3);
@SuppressWarnings("unused")
java.sql.Date[] dummy = (java.sql.Date[])ArrayUtils.subarray(dateArray, 1,3);
fail("Invalid downcast");
} catch (ClassCastException e) {}
}