From 13bdd203ce73b538c3fbda8e3b83cda08c3e850b Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Sat, 16 Jan 2010 13:00:07 +0000 Subject: [PATCH] Unused imports Suppress deprecation warnings for tests of deprecated methods git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@899938 13f79535-47bb-0310-9956-ffa450edef68 --- .../commons/lang3/exception/ExceptionUtilsTest.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java b/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java index 4a3a39ade..4843b7f3b 100644 --- a/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java @@ -17,21 +17,15 @@ package org.apache.commons.lang3.exception; import java.io.ByteArrayOutputStream; -import java.io.IOException; import java.io.PrintStream; import java.io.PrintWriter; import java.io.StringWriter; import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Modifier; -import java.sql.SQLException; import java.util.List; -import junit.framework.Assert; import junit.framework.TestCase; -import org.apache.commons.lang3.SystemUtils; - /** * Tests {@link org.apache.commons.lang3.exception.ExceptionUtils}. * @@ -123,6 +117,7 @@ public void testConstructor() { } //----------------------------------------------------------------------- + @SuppressWarnings("deprecation") // Specifically tests the deprecated methods public void testGetCause_Throwable() { assertSame(null, ExceptionUtils.getCause(null)); assertSame(null, ExceptionUtils.getCause(withoutCause)); @@ -134,6 +129,7 @@ public void testGetCause_Throwable() { assertSame(cyclicCause.getCause(), ExceptionUtils.getCause(((ExceptionWithCause) cyclicCause.getCause()).getCause())); } + @SuppressWarnings("deprecation") // Specifically tests the deprecated methods public void testGetCause_ThrowableArray() { assertSame(null, ExceptionUtils.getCause(null, null)); assertSame(null, ExceptionUtils.getCause(null, new String[0]));