diff --git a/checkstyle.xml b/checkstyle.xml
index 2616bf9..d810886 100644
--- a/checkstyle.xml
+++ b/checkstyle.xml
@@ -69,6 +69,7 @@ limitations under the License.
TestCase for JDK 1.4 logging when running on a JDK 1.4 system with diff --git a/src/test/java/org/apache/commons/logging/jdk14/DefaultConfigTestCase.java b/src/test/java/org/apache/commons/logging/jdk14/DefaultConfigTestCase.java index 15d35e9..fd348f7 100644 --- a/src/test/java/org/apache/commons/logging/jdk14/DefaultConfigTestCase.java +++ b/src/test/java/org/apache/commons/logging/jdk14/DefaultConfigTestCase.java @@ -23,14 +23,14 @@ import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; -import junit.framework.Test; -import junit.framework.TestCase; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.PathableClassLoader; import org.apache.commons.logging.PathableTestSuite; +import junit.framework.Test; +import junit.framework.TestCase; + /** *
TestCase for JDK 1.4 logging when running on a JDK 1.4 system with diff --git a/src/test/java/org/apache/commons/logging/log4j/StandardTests.java b/src/test/java/org/apache/commons/logging/log4j/StandardTests.java index 1456e0d..ad8efa0 100644 --- a/src/test/java/org/apache/commons/logging/log4j/StandardTests.java +++ b/src/test/java/org/apache/commons/logging/log4j/StandardTests.java @@ -25,12 +25,12 @@ import java.io.ObjectOutputStream; import java.util.ArrayList; import java.util.List; -import junit.framework.TestCase; - import org.apache.commons.logging.DummyException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import junit.framework.TestCase; + /** * Abstract set of tests that can be executed with various classpaths set. diff --git a/src/test/java/org/apache/commons/logging/log4j/log4j12/ApiClasspathStandardTestCase.java b/src/test/java/org/apache/commons/logging/log4j/log4j12/ApiClasspathStandardTestCase.java index 313a2fc..f275e9f 100644 --- a/src/test/java/org/apache/commons/logging/log4j/log4j12/ApiClasspathStandardTestCase.java +++ b/src/test/java/org/apache/commons/logging/log4j/log4j12/ApiClasspathStandardTestCase.java @@ -17,12 +17,12 @@ package org.apache.commons.logging.log4j.log4j12; -import junit.framework.Test; -import junit.framework.TestCase; - import org.apache.commons.logging.PathableClassLoader; import org.apache.commons.logging.PathableTestSuite; +import junit.framework.Test; +import junit.framework.TestCase; + /** * Tests for Log4J logging that emulate a webapp running within diff --git a/src/test/java/org/apache/commons/logging/log4j/log4j12/AppClasspathStandardTestCase.java b/src/test/java/org/apache/commons/logging/log4j/log4j12/AppClasspathStandardTestCase.java index 5c211cf..ca5851c 100644 --- a/src/test/java/org/apache/commons/logging/log4j/log4j12/AppClasspathStandardTestCase.java +++ b/src/test/java/org/apache/commons/logging/log4j/log4j12/AppClasspathStandardTestCase.java @@ -17,12 +17,12 @@ package org.apache.commons.logging.log4j.log4j12; -import junit.framework.Test; -import junit.framework.TestCase; - import org.apache.commons.logging.PathableClassLoader; import org.apache.commons.logging.PathableTestSuite; +import junit.framework.Test; +import junit.framework.TestCase; + /** * Tests for Log4J logging when there is only one classloader and everything * is in it, as would be the situation for a standalone application. diff --git a/src/test/java/org/apache/commons/logging/log4j/log4j12/ChildClasspathStandardTestCase.java b/src/test/java/org/apache/commons/logging/log4j/log4j12/ChildClasspathStandardTestCase.java index ca60f98..04bbe9f 100644 --- a/src/test/java/org/apache/commons/logging/log4j/log4j12/ChildClasspathStandardTestCase.java +++ b/src/test/java/org/apache/commons/logging/log4j/log4j12/ChildClasspathStandardTestCase.java @@ -17,12 +17,12 @@ package org.apache.commons.logging.log4j.log4j12; -import junit.framework.Test; -import junit.framework.TestCase; - import org.apache.commons.logging.PathableClassLoader; import org.apache.commons.logging.PathableTestSuite; +import junit.framework.Test; +import junit.framework.TestCase; + /** * Tests for Log4J logging that emulate a webapp running within diff --git a/src/test/java/org/apache/commons/logging/log4j/log4j12/ParentClasspathStandardTestCase.java b/src/test/java/org/apache/commons/logging/log4j/log4j12/ParentClasspathStandardTestCase.java index 733fd60..ccfba9a 100644 --- a/src/test/java/org/apache/commons/logging/log4j/log4j12/ParentClasspathStandardTestCase.java +++ b/src/test/java/org/apache/commons/logging/log4j/log4j12/ParentClasspathStandardTestCase.java @@ -17,12 +17,12 @@ package org.apache.commons.logging.log4j.log4j12; -import junit.framework.Test; -import junit.framework.TestCase; - import org.apache.commons.logging.PathableClassLoader; import org.apache.commons.logging.PathableTestSuite; +import junit.framework.Test; +import junit.framework.TestCase; + /** * Tests for Log4J logging that emulate a webapp running within * a container where all the necessary libs are in the parent. diff --git a/src/test/java/org/apache/commons/logging/log4j2/CallerInformationTestCase.java b/src/test/java/org/apache/commons/logging/log4j2/CallerInformationTestCase.java index 3ccf2df..970ec39 100644 --- a/src/test/java/org/apache/commons/logging/log4j2/CallerInformationTestCase.java +++ b/src/test/java/org/apache/commons/logging/log4j2/CallerInformationTestCase.java @@ -18,7 +18,6 @@ package org.apache.commons.logging.log4j2; import java.util.List; -import junit.framework.TestCase; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.impl.Log4jApiLogFactory; @@ -32,6 +31,8 @@ import org.apache.logging.log4j.core.test.appender.ListAppender; import org.apache.logging.log4j.message.ObjectMessage; import org.apache.logging.log4j.message.SimpleMessage; +import junit.framework.TestCase; + public class CallerInformationTestCase extends TestCase { private static final Object OBJ = new Object(); diff --git a/src/test/java/org/apache/commons/logging/logkit/StandardTestCase.java b/src/test/java/org/apache/commons/logging/logkit/StandardTestCase.java index aab3d10..aed7ade 100644 --- a/src/test/java/org/apache/commons/logging/logkit/StandardTestCase.java +++ b/src/test/java/org/apache/commons/logging/logkit/StandardTestCase.java @@ -23,8 +23,6 @@ import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; -import junit.framework.Test; - import org.apache.commons.logging.AbstractLogTest; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -32,6 +30,8 @@ import org.apache.commons.logging.PathableClassLoader; import org.apache.commons.logging.PathableTestSuite; import org.apache.commons.logging.impl.LogKitLogger; +import junit.framework.Test; + /** * Basic tests for Avalon LogKit logger adapter. */ diff --git a/src/test/java/org/apache/commons/logging/pathable/ChildFirstTestCase.java b/src/test/java/org/apache/commons/logging/pathable/ChildFirstTestCase.java index 91dcede..37cd2a6 100644 --- a/src/test/java/org/apache/commons/logging/pathable/ChildFirstTestCase.java +++ b/src/test/java/org/apache/commons/logging/pathable/ChildFirstTestCase.java @@ -23,13 +23,13 @@ import java.util.Enumeration; import java.util.HashSet; import java.util.Set; -import junit.framework.Test; -import junit.framework.TestCase; - import org.apache.commons.logging.Artifacts; import org.apache.commons.logging.PathableClassLoader; import org.apache.commons.logging.PathableTestSuite; +import junit.framework.Test; +import junit.framework.TestCase; + /** * Tests for the PathableTestSuite and PathableClassLoader functionality, * where lookup order for the PathableClassLoader is child-first. diff --git a/src/test/java/org/apache/commons/logging/pathable/GeneralTestCase.java b/src/test/java/org/apache/commons/logging/pathable/GeneralTestCase.java index 167db44..5c61fb3 100644 --- a/src/test/java/org/apache/commons/logging/pathable/GeneralTestCase.java +++ b/src/test/java/org/apache/commons/logging/pathable/GeneralTestCase.java @@ -19,12 +19,12 @@ package org.apache.commons.logging.pathable; import java.net.URL; import java.net.URLClassLoader; -import junit.framework.Test; -import junit.framework.TestCase; - import org.apache.commons.logging.PathableClassLoader; import org.apache.commons.logging.PathableTestSuite; +import junit.framework.Test; +import junit.framework.TestCase; + /** * Tests for the PathableTestSuite class. */ diff --git a/src/test/java/org/apache/commons/logging/pathable/ParentFirstTestCase.java b/src/test/java/org/apache/commons/logging/pathable/ParentFirstTestCase.java index aaa3013..427d45c 100644 --- a/src/test/java/org/apache/commons/logging/pathable/ParentFirstTestCase.java +++ b/src/test/java/org/apache/commons/logging/pathable/ParentFirstTestCase.java @@ -25,13 +25,13 @@ import java.util.Enumeration; import java.util.HashSet; import java.util.Set; -import junit.framework.Test; -import junit.framework.TestCase; - import org.apache.commons.logging.Artifacts; import org.apache.commons.logging.PathableClassLoader; import org.apache.commons.logging.PathableTestSuite; +import junit.framework.Test; +import junit.framework.TestCase; + /** * Tests for the PathableTestSuite and PathableClassLoader functionality, * where lookup order for the PathableClassLoader is parent-first. diff --git a/src/test/java/org/apache/commons/logging/security/SecurityAllowedTestCase.java b/src/test/java/org/apache/commons/logging/security/SecurityAllowedTestCase.java index dbb814a..83cbdde 100644 --- a/src/test/java/org/apache/commons/logging/security/SecurityAllowedTestCase.java +++ b/src/test/java/org/apache/commons/logging/security/SecurityAllowedTestCase.java @@ -24,14 +24,13 @@ import java.lang.reflect.Method; import java.security.AllPermission; import java.util.Hashtable; -import junit.framework.Test; -import junit.framework.TestCase; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.PathableClassLoader; import org.apache.commons.logging.PathableTestSuite; -import org.junit.Assume; + +import junit.framework.Test; +import junit.framework.TestCase; /** * Tests for logging with a security policy that allows JCL access to everything. diff --git a/src/test/java/org/apache/commons/logging/security/SecurityForbiddenTestCase.java b/src/test/java/org/apache/commons/logging/security/SecurityForbiddenTestCase.java index 66abab9..e8da079 100644 --- a/src/test/java/org/apache/commons/logging/security/SecurityForbiddenTestCase.java +++ b/src/test/java/org/apache/commons/logging/security/SecurityForbiddenTestCase.java @@ -25,14 +25,13 @@ import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.Hashtable; -import junit.framework.Test; -import junit.framework.TestCase; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.PathableClassLoader; import org.apache.commons.logging.PathableTestSuite; -import org.junit.Assume; + +import junit.framework.Test; +import junit.framework.TestCase; /** * Tests for logging with a security policy that forbids JCL access to anything. diff --git a/src/test/java/org/apache/commons/logging/serviceloader/ServiceLoaderTestCase.java b/src/test/java/org/apache/commons/logging/serviceloader/ServiceLoaderTestCase.java index 24b561d..7ac7c4f 100644 --- a/src/test/java/org/apache/commons/logging/serviceloader/ServiceLoaderTestCase.java +++ b/src/test/java/org/apache/commons/logging/serviceloader/ServiceLoaderTestCase.java @@ -16,11 +16,11 @@ */ package org.apache.commons.logging.serviceloader; -import junit.framework.TestCase; - import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.serviceloader.internal.DummyLogFactory; +import junit.framework.TestCase; + public class ServiceLoaderTestCase extends TestCase { public void testServiceLoader() { diff --git a/src/test/java/org/apache/commons/logging/servlet/BasicServletTestCase.java b/src/test/java/org/apache/commons/logging/servlet/BasicServletTestCase.java index d1031b7..bf1a8c2 100644 --- a/src/test/java/org/apache/commons/logging/servlet/BasicServletTestCase.java +++ b/src/test/java/org/apache/commons/logging/servlet/BasicServletTestCase.java @@ -17,13 +17,13 @@ package org.apache.commons.logging.servlet; -import junit.framework.Test; -import junit.framework.TestCase; - import org.apache.commons.logging.PathableClassLoader; import org.apache.commons.logging.PathableTestSuite; import org.apache.commons.logging.impl.ServletContextCleaner; +import junit.framework.Test; +import junit.framework.TestCase; + /** * Tests for ServletContextCleaner utility class. diff --git a/src/test/java/org/apache/commons/logging/simple/CustomConfigTestCase.java b/src/test/java/org/apache/commons/logging/simple/CustomConfigTestCase.java index 611950e..e081bec 100644 --- a/src/test/java/org/apache/commons/logging/simple/CustomConfigTestCase.java +++ b/src/test/java/org/apache/commons/logging/simple/CustomConfigTestCase.java @@ -22,14 +22,14 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import junit.framework.Test; - import org.apache.commons.logging.DummyException; import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.PathableClassLoader; import org.apache.commons.logging.PathableTestSuite; import org.apache.commons.logging.impl.SimpleLog; +import junit.framework.Test; + /** *
TestCase for simple logging when running with custom configuration diff --git a/src/test/java/org/apache/commons/logging/simple/DateTimeCustomConfigTestCase.java b/src/test/java/org/apache/commons/logging/simple/DateTimeCustomConfigTestCase.java index 3b5d6f0..21e914e 100644 --- a/src/test/java/org/apache/commons/logging/simple/DateTimeCustomConfigTestCase.java +++ b/src/test/java/org/apache/commons/logging/simple/DateTimeCustomConfigTestCase.java @@ -21,11 +21,11 @@ import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; -import junit.framework.Test; - import org.apache.commons.logging.PathableClassLoader; import org.apache.commons.logging.PathableTestSuite; +import junit.framework.Test; + /** * Tests custom date time format configuration diff --git a/src/test/java/org/apache/commons/logging/simple/DefaultConfigTestCase.java b/src/test/java/org/apache/commons/logging/simple/DefaultConfigTestCase.java index 936f1f9..c002a4c 100644 --- a/src/test/java/org/apache/commons/logging/simple/DefaultConfigTestCase.java +++ b/src/test/java/org/apache/commons/logging/simple/DefaultConfigTestCase.java @@ -23,15 +23,15 @@ import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; -import junit.framework.Test; -import junit.framework.TestCase; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.PathableClassLoader; import org.apache.commons.logging.PathableTestSuite; import org.apache.commons.logging.impl.SimpleLog; +import junit.framework.Test; +import junit.framework.TestCase; + /** *
TestCase for simple logging when running with zero configuration diff --git a/src/test/java/org/apache/commons/logging/slf4j/CallerInformationTestCase.java b/src/test/java/org/apache/commons/logging/slf4j/CallerInformationTestCase.java index e85511b..d24cbf2 100644 --- a/src/test/java/org/apache/commons/logging/slf4j/CallerInformationTestCase.java +++ b/src/test/java/org/apache/commons/logging/slf4j/CallerInformationTestCase.java @@ -20,6 +20,13 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.commons.logging.impl.Slf4jLogFactory; +import org.slf4j.LoggerFactory; +import org.slf4j.Marker; +import org.slf4j.MarkerFactory; + import ch.qos.logback.classic.Level; import ch.qos.logback.classic.Logger; import ch.qos.logback.classic.LoggerContext; @@ -29,12 +36,6 @@ import ch.qos.logback.core.filter.Filter; import ch.qos.logback.core.read.ListAppender; import ch.qos.logback.core.spi.FilterReply; import junit.framework.TestCase; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.commons.logging.impl.Slf4jLogFactory; -import org.slf4j.LoggerFactory; -import org.slf4j.Marker; -import org.slf4j.MarkerFactory; public class CallerInformationTestCase extends TestCase { diff --git a/src/test/java/org/apache/commons/logging/tccl/BadTCCLTestCase.java b/src/test/java/org/apache/commons/logging/tccl/BadTCCLTestCase.java index 0073c02..084a7d7 100644 --- a/src/test/java/org/apache/commons/logging/tccl/BadTCCLTestCase.java +++ b/src/test/java/org/apache/commons/logging/tccl/BadTCCLTestCase.java @@ -16,14 +16,14 @@ */ package org.apache.commons.logging.tccl; -import junit.framework.Test; -import junit.framework.TestCase; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.PathableClassLoader; import org.apache.commons.logging.PathableTestSuite; +import junit.framework.Test; +import junit.framework.TestCase; + /** * Simulates the case when TCCL is badly set and cannot load JCL. */ diff --git a/src/test/java/org/apache/commons/logging/tccl/NullTCCLTestCase.java b/src/test/java/org/apache/commons/logging/tccl/NullTCCLTestCase.java index 255a333..271a1f3 100644 --- a/src/test/java/org/apache/commons/logging/tccl/NullTCCLTestCase.java +++ b/src/test/java/org/apache/commons/logging/tccl/NullTCCLTestCase.java @@ -16,13 +16,13 @@ */ package org.apache.commons.logging.tccl; -import junit.framework.Test; -import junit.framework.TestCase; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.PathableTestSuite; +import junit.framework.Test; +import junit.framework.TestCase; + /** * Simulates the case when TCCL is set to NULL. */ diff --git a/src/test/java/org/apache/commons/logging/tccl/log/TcclDisabledTestCase.java b/src/test/java/org/apache/commons/logging/tccl/log/TcclDisabledTestCase.java index 4241ac1..5a9adf2 100644 --- a/src/test/java/org/apache/commons/logging/tccl/log/TcclDisabledTestCase.java +++ b/src/test/java/org/apache/commons/logging/tccl/log/TcclDisabledTestCase.java @@ -20,15 +20,15 @@ package org.apache.commons.logging.tccl.log; import java.net.URL; -import junit.framework.Test; -import junit.framework.TestCase; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogConfigurationException; import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.PathableClassLoader; import org.apache.commons.logging.PathableTestSuite; +import junit.framework.Test; +import junit.framework.TestCase; + /** * Verify that by default LogFactoryImpl is loaded from the tccl classloader. diff --git a/src/test/java/org/apache/commons/logging/tccl/log/TcclEnabledTestCase.java b/src/test/java/org/apache/commons/logging/tccl/log/TcclEnabledTestCase.java index 3f65cad..2c9e1f8 100644 --- a/src/test/java/org/apache/commons/logging/tccl/log/TcclEnabledTestCase.java +++ b/src/test/java/org/apache/commons/logging/tccl/log/TcclEnabledTestCase.java @@ -20,14 +20,14 @@ package org.apache.commons.logging.tccl.log; import java.net.URL; -import junit.framework.Test; -import junit.framework.TestCase; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.PathableClassLoader; import org.apache.commons.logging.PathableTestSuite; +import junit.framework.Test; +import junit.framework.TestCase; + /** * Verify that by default the standard LogFactoryImpl class loads a diff --git a/src/test/java/org/apache/commons/logging/tccl/logfactory/TcclDisabledTestCase.java b/src/test/java/org/apache/commons/logging/tccl/logfactory/TcclDisabledTestCase.java index 57144fe..e7d7af2 100644 --- a/src/test/java/org/apache/commons/logging/tccl/logfactory/TcclDisabledTestCase.java +++ b/src/test/java/org/apache/commons/logging/tccl/logfactory/TcclDisabledTestCase.java @@ -20,13 +20,13 @@ package org.apache.commons.logging.tccl.logfactory; import java.net.URL; -import junit.framework.Test; -import junit.framework.TestCase; - import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.PathableClassLoader; import org.apache.commons.logging.PathableTestSuite; +import junit.framework.Test; +import junit.framework.TestCase; + /** * Verify that a commons-logging.properties file can prevent a custom diff --git a/src/test/java/org/apache/commons/logging/tccl/logfactory/TcclEnabledTestCase.java b/src/test/java/org/apache/commons/logging/tccl/logfactory/TcclEnabledTestCase.java index f756fa5..b2e9326 100644 --- a/src/test/java/org/apache/commons/logging/tccl/logfactory/TcclEnabledTestCase.java +++ b/src/test/java/org/apache/commons/logging/tccl/logfactory/TcclEnabledTestCase.java @@ -20,13 +20,13 @@ package org.apache.commons.logging.tccl.logfactory; import java.net.URL; -import junit.framework.Test; -import junit.framework.TestCase; - import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.PathableClassLoader; import org.apache.commons.logging.PathableTestSuite; +import junit.framework.Test; +import junit.framework.TestCase; + /** * Verify that by default a custom LogFactoryImpl is loaded from the