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
This commit is contained in:
Sebastian Bazley 2010-01-16 13:00:07 +00:00
parent 78792f3873
commit 13bdd203ce
1 changed files with 2 additions and 6 deletions

View File

@ -17,21 +17,15 @@
package org.apache.commons.lang3.exception; package org.apache.commons.lang3.exception;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.PrintStream; import java.io.PrintStream;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.io.StringWriter; import java.io.StringWriter;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Modifier; import java.lang.reflect.Modifier;
import java.sql.SQLException;
import java.util.List; import java.util.List;
import junit.framework.Assert;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.apache.commons.lang3.SystemUtils;
/** /**
* Tests {@link org.apache.commons.lang3.exception.ExceptionUtils}. * Tests {@link org.apache.commons.lang3.exception.ExceptionUtils}.
* *
@ -123,6 +117,7 @@ public class ExceptionUtilsTest extends TestCase {
} }
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
@SuppressWarnings("deprecation") // Specifically tests the deprecated methods
public void testGetCause_Throwable() { public void testGetCause_Throwable() {
assertSame(null, ExceptionUtils.getCause(null)); assertSame(null, ExceptionUtils.getCause(null));
assertSame(null, ExceptionUtils.getCause(withoutCause)); assertSame(null, ExceptionUtils.getCause(withoutCause));
@ -134,6 +129,7 @@ public class ExceptionUtilsTest extends TestCase {
assertSame(cyclicCause.getCause(), ExceptionUtils.getCause(((ExceptionWithCause) cyclicCause.getCause()).getCause())); assertSame(cyclicCause.getCause(), ExceptionUtils.getCause(((ExceptionWithCause) cyclicCause.getCause()).getCause()));
} }
@SuppressWarnings("deprecation") // Specifically tests the deprecated methods
public void testGetCause_ThrowableArray() { public void testGetCause_ThrowableArray() {
assertSame(null, ExceptionUtils.getCause(null, null)); assertSame(null, ExceptionUtils.getCause(null, null));
assertSame(null, ExceptionUtils.getCause(null, new String[0])); assertSame(null, ExceptionUtils.getCause(null, new String[0]));