From f80e102dde6a5e7633c2a6bbcd7a485af5498c50 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Sun, 26 Nov 2023 10:08:31 -0500 Subject: [PATCH] Remove extra blank lines --- .../apache/commons/logging/LogFactory.java | 7 ---- .../logging/impl/Jdk13LumberjackLogger.java | 3 -- .../commons/logging/impl/Jdk14Logger.java | 1 - .../commons/logging/impl/LogFactoryImpl.java | 6 ---- .../commons/logging/impl/LogKitLogger.java | 4 --- .../commons/logging/impl/SimpleLog.java | 8 ----- .../commons/logging/impl/Slf4jLogFactory.java | 1 - .../commons/logging/AbstractLogTest.java | 1 - .../logging/GarbageCollectionHelper.java | 1 - .../apache/commons/logging/LoadTestCase.java | 2 -- .../LogFactoryWeakReferenceTestCase.java | 1 - .../config/FirstPriorityConfigTestCase.java | 5 --- .../config/PriorityConfigTestCase.java | 5 --- .../logging/impl/WeakHashtableTestCase.java | 1 - .../jdk14/CustomConfigAPITestCase.java | 1 - .../jdk14/CustomConfigFullTestCase.java | 4 --- .../logging/jdk14/CustomConfigTestCase.java | 33 ------------------- .../logging/jdk14/DefaultConfigTestCase.java | 3 -- .../commons/logging/jdk14/TestHandler.java | 2 -- .../commons/logging/log4j/StandardTests.java | 3 -- .../log4j12/ApiClasspathStandardTestCase.java | 1 - .../ChildClasspathStandardTestCase.java | 1 - .../logging/log4j/log4j12/TestAppender.java | 8 ----- .../logging/logkit/StandardTestCase.java | 11 ------- .../commons/logging/noop/NoOpLogTestCase.java | 2 -- .../logging/pathable/ChildFirstTestCase.java | 1 - .../logging/security/MockSecurityManager.java | 1 - .../logging/servlet/BasicServletTestCase.java | 1 - .../logging/simple/CustomConfigTestCase.java | 7 ---- .../simple/DateTimeCustomConfigTestCase.java | 5 --- .../logging/simple/DecoratedSimpleLog.java | 20 ----------- .../logging/simple/DefaultConfigTestCase.java | 6 ---- .../commons/logging/simple/LogRecord.java | 4 --- .../tccl/log/TcclDisabledTestCase.java | 4 --- .../logging/tccl/log/TcclEnabledTestCase.java | 4 --- .../tccl/logfactory/TcclDisabledTestCase.java | 5 --- .../tccl/logfactory/TcclEnabledTestCase.java | 5 --- 37 files changed, 178 deletions(-) diff --git a/src/main/java/org/apache/commons/logging/LogFactory.java b/src/main/java/org/apache/commons/logging/LogFactory.java index f3d5588..646a5a3 100644 --- a/src/main/java/org/apache/commons/logging/LogFactory.java +++ b/src/main/java/org/apache/commons/logging/LogFactory.java @@ -70,7 +70,6 @@ public abstract class LogFactory { // library and JCL have the necessary permissions even when the untrusted // caller does not. That's a pretty hard route to exploit though. - /** * The name ({@code priority}) of the key in the configuration file used to * specify the priority of that particular configuration file. The associated value @@ -204,14 +203,12 @@ public abstract class LogFactory { */ private static final int MAX_BROKEN_SERVICES = 3; - /** * The previously constructed {@code LogFactory} instances, keyed by * the {@code ClassLoader} with which it was created. */ protected static Hashtable factories; - /** * Previously constructed {@code LogFactory} instance as in the * {@code factories} map, but for the case where @@ -531,7 +528,6 @@ public abstract class LogFactory { return classLoader; } - /** * Check cached factories (keyed by contextClassLoader) * @@ -689,7 +685,6 @@ public abstract class LogFactory { return props; } - /** * Returns the current context class loader. *

@@ -755,7 +750,6 @@ public abstract class LogFactory { // Identify the class loader we will be using final ClassLoader contextClassLoader = getContextClassLoaderInternal(); - // This is an odd enough situation to report about. This // output will be a nuisance on JDK1.1, as the system // class loader is null in that environment. @@ -1076,7 +1070,6 @@ public abstract class LogFactory { }); } - /** * Read the specified system property, using an AccessController so that * the property can be read if JCL has been granted the appropriate diff --git a/src/main/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java b/src/main/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java index 9dc1e47..43eb0dc 100644 --- a/src/main/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java +++ b/src/main/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java @@ -41,7 +41,6 @@ public class Jdk13LumberjackLogger implements Log, Serializable { /** Serializable version identifier. */ private static final long serialVersionUID = -8649807923527610591L; - /** * This member variable simply ensures that any attempt to initialize * this class in a pre-1.4 JVM will result in an ExceptionInInitializerError. @@ -69,7 +68,6 @@ public class Jdk13LumberjackLogger implements Log, Serializable { /** Class and method found flag. */ private boolean classAndMethodFound; - /** * Constructs a named instance of this Logger. * @@ -80,7 +78,6 @@ public class Jdk13LumberjackLogger implements Log, Serializable { logger = getLogger(); } - /** * Logs a message with {@code java.util.logging.Level.FINE}. * diff --git a/src/main/java/org/apache/commons/logging/impl/Jdk14Logger.java b/src/main/java/org/apache/commons/logging/impl/Jdk14Logger.java index ea42c18..eb47bc4 100644 --- a/src/main/java/org/apache/commons/logging/impl/Jdk14Logger.java +++ b/src/main/java/org/apache/commons/logging/impl/Jdk14Logger.java @@ -41,7 +41,6 @@ public class Jdk14Logger implements Log, Serializable { */ protected static final Level dummyLevel = Level.FINE; - /** * The underlying Logger implementation we are using. */ diff --git a/src/main/java/org/apache/commons/logging/impl/LogFactoryImpl.java b/src/main/java/org/apache/commons/logging/impl/LogFactoryImpl.java index 3545d55..ef0f1cd 100644 --- a/src/main/java/org/apache/commons/logging/impl/LogFactoryImpl.java +++ b/src/main/java/org/apache/commons/logging/impl/LogFactoryImpl.java @@ -80,14 +80,12 @@ public class LogFactoryImpl extends LogFactory { */ private static final String[] EMPTY_STRING_ARRAY = {}; - /** * The name ({@code org.apache.commons.logging.Log}) of the system * property identifying our {@link Log} implementation class. */ public static final String LOG_PROPERTY = "org.apache.commons.logging.Log"; - /** * The deprecated system property used for backwards compatibility with * old versions of JCL. @@ -165,7 +163,6 @@ public class LogFactoryImpl extends LogFactory { return LogFactory.getClassLoader(clazz); } - /** * Gets the context ClassLoader. * This method is a workaround for a java 1.2 compiler bug. @@ -273,7 +270,6 @@ public class LogFactoryImpl extends LogFactory { */ protected Class[] logConstructorSignature = { String.class }; - /** * The one-argument {@code setLogFactory} method of the selected * {@link org.apache.commons.logging.Log} method, if it exists. @@ -654,7 +650,6 @@ public class LogFactoryImpl extends LogFactory { return attributes.get(name); } - /** * Return an array containing the names of all currently defined * configuration attributes. If there are no such attributes, a zero @@ -753,7 +748,6 @@ public class LogFactoryImpl extends LogFactory { return Boolean.parseBoolean(val); } - /** * Attempt to find an attribute (see method setAttribute) or a * system property with the provided name and return its value. diff --git a/src/main/java/org/apache/commons/logging/impl/LogKitLogger.java b/src/main/java/org/apache/commons/logging/impl/LogKitLogger.java index d2112d0..b94b124 100644 --- a/src/main/java/org/apache/commons/logging/impl/LogKitLogger.java +++ b/src/main/java/org/apache/commons/logging/impl/LogKitLogger.java @@ -40,14 +40,12 @@ public class LogKitLogger implements Log, Serializable { /** Serializable version identifier. */ private static final long serialVersionUID = 3768538055836059519L; - /** Logging goes to this {@code LogKit} logger */ protected transient volatile Logger logger; /** Name of this logger */ protected String name; - /** * Constructs {@code LogKitLogger} which wraps the {@code LogKit} * logger with given name. @@ -59,7 +57,6 @@ public class LogKitLogger implements Log, Serializable { this.logger = getLogger(); } - /** * Logs a message with {@code org.apache.log.Priority.DEBUG}. * @@ -73,7 +70,6 @@ public class LogKitLogger implements Log, Serializable { } } - /** * Logs a message with {@code org.apache.log.Priority.DEBUG}. * diff --git a/src/main/java/org/apache/commons/logging/impl/SimpleLog.java b/src/main/java/org/apache/commons/logging/impl/SimpleLog.java index b583977..62a2c8c 100644 --- a/src/main/java/org/apache/commons/logging/impl/SimpleLog.java +++ b/src/main/java/org/apache/commons/logging/impl/SimpleLog.java @@ -74,7 +74,6 @@ public class SimpleLog implements Log, Serializable { /** Serializable version identifier. */ private static final long serialVersionUID = 136942970684951178L; - /** All system properties used by {@code SimpleLog} start with this */ static protected final String systemPrefix = "org.apache.commons.logging.simplelog."; @@ -110,7 +109,6 @@ public class SimpleLog implements Log, Serializable { */ static protected DateFormat dateFormatter; - /** "Trace" level logging. */ public static final int LOG_LEVEL_TRACE = 1; /** "Debug" level logging. */ @@ -130,7 +128,6 @@ public class SimpleLog implements Log, Serializable { /** Enable no logging levels */ public static final int LOG_LEVEL_OFF = LOG_LEVEL_FATAL + 1; - // Initialize class attributes. // Load properties file, if found. // Override with system properties. @@ -242,7 +239,6 @@ public class SimpleLog implements Log, Serializable { }); } - private static String getStringProperty(final String name) { String prop = null; try { @@ -259,11 +255,9 @@ public class SimpleLog implements Log, Serializable { /** The name of this simple log instance */ protected volatile String logName; - /** The current log level */ protected volatile int currentLogLevel; - /** The short name of this simple log instance */ private volatile String shortLogName; @@ -312,7 +306,6 @@ public class SimpleLog implements Log, Serializable { } } - /** * Logs a message with * {@code org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_DEBUG}. @@ -369,7 +362,6 @@ public class SimpleLog implements Log, Serializable { } } - /** * Log a message with {@code org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_FATAL}. * diff --git a/src/main/java/org/apache/commons/logging/impl/Slf4jLogFactory.java b/src/main/java/org/apache/commons/logging/impl/Slf4jLogFactory.java index f80ba31..5387a28 100644 --- a/src/main/java/org/apache/commons/logging/impl/Slf4jLogFactory.java +++ b/src/main/java/org/apache/commons/logging/impl/Slf4jLogFactory.java @@ -92,7 +92,6 @@ public final class Slf4jLogFactory extends LogFactory { log(INFO_INT, message, t); } - @Override public boolean isDebugEnabled() { return logger.isDebugEnabled(MARKER); diff --git a/src/test/java/org/apache/commons/logging/AbstractLogTest.java b/src/test/java/org/apache/commons/logging/AbstractLogTest.java index 352ea60..c320a3c 100644 --- a/src/test/java/org/apache/commons/logging/AbstractLogTest.java +++ b/src/test/java/org/apache/commons/logging/AbstractLogTest.java @@ -18,7 +18,6 @@ package org.apache.commons.logging; import junit.framework.TestCase; - /** * Generic tests that can be applied to any log adapter by * subclassing this class and defining method getLogObject diff --git a/src/test/java/org/apache/commons/logging/GarbageCollectionHelper.java b/src/test/java/org/apache/commons/logging/GarbageCollectionHelper.java index 85cab3b..3948a13 100644 --- a/src/test/java/org/apache/commons/logging/GarbageCollectionHelper.java +++ b/src/test/java/org/apache/commons/logging/GarbageCollectionHelper.java @@ -15,7 +15,6 @@ * limitations under the license. */ - package org.apache.commons.logging; import java.io.Closeable; diff --git a/src/test/java/org/apache/commons/logging/LoadTestCase.java b/src/test/java/org/apache/commons/logging/LoadTestCase.java index 3f043ae..17f14fb 100644 --- a/src/test/java/org/apache/commons/logging/LoadTestCase.java +++ b/src/test/java/org/apache/commons/logging/LoadTestCase.java @@ -95,7 +95,6 @@ public class LoadTestCase extends TestCase { static private String[] LOG_PCKG = {"org.apache.commons.logging", "org.apache.commons.logging.impl"}; - private ClassLoader origContextClassLoader; private void execute(final Class cls) throws Exception { @@ -126,7 +125,6 @@ public class LoadTestCase extends TestCase { } - /** * Call the static setAllowFlawedContext method on the specified class * (expected to be a UserClass loaded via a custom class loader), passing diff --git a/src/test/java/org/apache/commons/logging/LogFactoryWeakReferenceTestCase.java b/src/test/java/org/apache/commons/logging/LogFactoryWeakReferenceTestCase.java index bf8f615..90eeb73 100644 --- a/src/test/java/org/apache/commons/logging/LogFactoryWeakReferenceTestCase.java +++ b/src/test/java/org/apache/commons/logging/LogFactoryWeakReferenceTestCase.java @@ -15,7 +15,6 @@ * limitations under the License. */ - package org.apache.commons.logging; import java.lang.ref.WeakReference; diff --git a/src/test/java/org/apache/commons/logging/config/FirstPriorityConfigTestCase.java b/src/test/java/org/apache/commons/logging/config/FirstPriorityConfigTestCase.java index 64eb551..47f3803 100644 --- a/src/test/java/org/apache/commons/logging/config/FirstPriorityConfigTestCase.java +++ b/src/test/java/org/apache/commons/logging/config/FirstPriorityConfigTestCase.java @@ -17,7 +17,6 @@ package org.apache.commons.logging.config; - import java.net.URL; import org.apache.commons.logging.LogFactory; @@ -27,7 +26,6 @@ import org.apache.commons.logging.PathableTestSuite; import junit.framework.Test; import junit.framework.TestCase; - /** * Tests that verify that the process of configuring logging on startup * works correctly by selecting the file with the highest priority. @@ -41,8 +39,6 @@ import junit.framework.TestCase; */ public class FirstPriorityConfigTestCase extends TestCase { - - /** * Return the tests included in this test suite. */ @@ -99,7 +95,6 @@ public class FirstPriorityConfigTestCase extends TestCase { LogFactory.releaseAll(); } - /** * Verify that the config file being used is the one containing * the desired configId value. diff --git a/src/test/java/org/apache/commons/logging/config/PriorityConfigTestCase.java b/src/test/java/org/apache/commons/logging/config/PriorityConfigTestCase.java index 659096f..440ba00 100644 --- a/src/test/java/org/apache/commons/logging/config/PriorityConfigTestCase.java +++ b/src/test/java/org/apache/commons/logging/config/PriorityConfigTestCase.java @@ -17,7 +17,6 @@ package org.apache.commons.logging.config; - import java.net.URL; import org.apache.commons.logging.LogFactory; @@ -27,7 +26,6 @@ import org.apache.commons.logging.PathableTestSuite; import junit.framework.Test; import junit.framework.TestCase; - /** * Tests that verify that the process of configuring logging on startup * works correctly by selecting the file with the highest priority. @@ -48,8 +46,6 @@ import junit.framework.TestCase; public class PriorityConfigTestCase extends TestCase { - - /** * Return the tests included in this test suite. */ @@ -117,7 +113,6 @@ public class PriorityConfigTestCase extends TestCase { LogFactory.releaseAll(); } - /** * Verify that the config file being used is the one containing * the desired configId value. diff --git a/src/test/java/org/apache/commons/logging/impl/WeakHashtableTestCase.java b/src/test/java/org/apache/commons/logging/impl/WeakHashtableTestCase.java index 2bf5f52..7f3c232 100644 --- a/src/test/java/org/apache/commons/logging/impl/WeakHashtableTestCase.java +++ b/src/test/java/org/apache/commons/logging/impl/WeakHashtableTestCase.java @@ -15,7 +15,6 @@ * limitations under the License. */ - package org.apache.commons.logging.impl; import java.lang.ref.ReferenceQueue; diff --git a/src/test/java/org/apache/commons/logging/jdk14/CustomConfigAPITestCase.java b/src/test/java/org/apache/commons/logging/jdk14/CustomConfigAPITestCase.java index 8fdb590..4287446 100644 --- a/src/test/java/org/apache/commons/logging/jdk14/CustomConfigAPITestCase.java +++ b/src/test/java/org/apache/commons/logging/jdk14/CustomConfigAPITestCase.java @@ -22,7 +22,6 @@ import org.apache.commons.logging.PathableTestSuite; import junit.framework.Test; - /** * TestCase for Jdk14 logging when the commons-logging-api jar file is in * the parent classpath and commons-logging.jar is in the child. diff --git a/src/test/java/org/apache/commons/logging/jdk14/CustomConfigFullTestCase.java b/src/test/java/org/apache/commons/logging/jdk14/CustomConfigFullTestCase.java index 85420a5..4fd703e 100644 --- a/src/test/java/org/apache/commons/logging/jdk14/CustomConfigFullTestCase.java +++ b/src/test/java/org/apache/commons/logging/jdk14/CustomConfigFullTestCase.java @@ -17,13 +17,11 @@ package org.apache.commons.logging.jdk14; - import org.apache.commons.logging.PathableClassLoader; import org.apache.commons.logging.PathableTestSuite; import junit.framework.Test; - /** * TestCase for Jdk14 logging when the commons-logging jar file is in * the parent classpath. @@ -31,7 +29,6 @@ import junit.framework.Test; public class CustomConfigFullTestCase extends CustomConfigTestCase { - /** * Return the tests included in this test suite. */ @@ -56,7 +53,6 @@ public class CustomConfigFullTestCase extends CustomConfigTestCase { return new PathableTestSuite(testClass, child); } - public CustomConfigFullTestCase(final String name) { super(name); } diff --git a/src/test/java/org/apache/commons/logging/jdk14/CustomConfigTestCase.java b/src/test/java/org/apache/commons/logging/jdk14/CustomConfigTestCase.java index 32c7abb..4781907 100644 --- a/src/test/java/org/apache/commons/logging/jdk14/CustomConfigTestCase.java +++ b/src/test/java/org/apache/commons/logging/jdk14/CustomConfigTestCase.java @@ -17,7 +17,6 @@ package org.apache.commons.logging.jdk14; - import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.lang.reflect.Method; @@ -34,7 +33,6 @@ import org.apache.commons.logging.PathableTestSuite; import junit.framework.Test; - /** *

TestCase for JDK 1.4 logging when running on a JDK 1.4 system with * custom configuration, so that JDK 1.4 should be selected and an appropriate @@ -45,8 +43,6 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { protected static final String HANDLER_NAME = "org.apache.commons.logging.jdk14.TestHandler"; - - /** * Make a class available in the system class loader even when its classfile is * not present in the classpath configured for that class loader. This only @@ -82,9 +78,6 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { } } - - - /** * Given the name of a class that is somewhere in the classpath of the provided * class loader, return the contents of the corresponding .class file. @@ -107,7 +100,6 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { return baos.toByteArray(); } - /** * Return the tests included in this test suite. */ @@ -130,33 +122,26 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { return new PathableTestSuite(testClass, cl); } - /** *

The customized {@code Handler} we will be using.

*/ protected TestHandler handler; - /** *

The underlying {@code Handler}s we will be using.

*/ protected Handler handlers[]; - /** *

The underlying {@code Logger} we will be using.

*/ protected Logger logger; - /** *

The underlying {@code LogManager} we will be using.

*/ protected LogManager manager; - - - /** *

The message levels that should have been logged.

*/ @@ -178,7 +163,6 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { super(name); } - // Check the log instance @Override protected void checkLog() { @@ -233,9 +217,6 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { handler.flush(); } - - - // Log the messages with exceptions protected void logExceptionMessages() { final Throwable t = new DummyException(); @@ -247,7 +228,6 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { log.fatal("fatal", t); } - // Log the plain messages protected void logPlainMessages() { log.trace("trace"); // Should not actually get logged @@ -258,7 +238,6 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { log.fatal("fatal"); } - /** * Sets up instance variables required by this test case. */ @@ -272,7 +251,6 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { setUpLog(this.getClass().getName()); } - // Set up handlers instance protected void setUpHandlers() throws Exception { Logger parent = logger; @@ -300,15 +278,11 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { handler = (TestHandler) handlers[0]; } - // Set up logger instance protected void setUpLogger(final String name) throws Exception { logger = Logger.getLogger(name); } - - - // Set up LogManager instance protected void setUpManager(final String config) throws Exception { manager = LogManager.getLogManager(); @@ -318,7 +292,6 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { is.close(); } - /** * Tear down instance variables required by this test case. */ @@ -330,7 +303,6 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { manager = null; } - // Test logging message strings with exceptions public void testExceptionMessages() throws Exception { @@ -339,7 +311,6 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { } - // Test logging plain message strings public void testPlainMessages() throws Exception { @@ -348,7 +319,6 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { } - // Test pristine Handlers instances public void testPristineHandlers() { @@ -359,7 +329,6 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { } - // Test pristine Logger instance public void testPristineLogger() { @@ -377,7 +346,6 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { } - // Test Serializability of Log instance @Override public void testSerializable() throws Exception { @@ -387,5 +355,4 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { } - } 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 fd348f7..70436ad 100644 --- a/src/test/java/org/apache/commons/logging/jdk14/DefaultConfigTestCase.java +++ b/src/test/java/org/apache/commons/logging/jdk14/DefaultConfigTestCase.java @@ -17,7 +17,6 @@ package org.apache.commons.logging.jdk14; - import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; @@ -31,7 +30,6 @@ 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 * zero configuration, and with Log4J not present (so JDK 1.4 logging @@ -108,7 +106,6 @@ public class DefaultConfigTestCase extends TestCase { log = LogFactory.getLog(name); } - /** * Tear down instance variables required by this test case. */ diff --git a/src/test/java/org/apache/commons/logging/jdk14/TestHandler.java b/src/test/java/org/apache/commons/logging/jdk14/TestHandler.java index eaa7306..a35e5dd 100644 --- a/src/test/java/org/apache/commons/logging/jdk14/TestHandler.java +++ b/src/test/java/org/apache/commons/logging/jdk14/TestHandler.java @@ -16,14 +16,12 @@ */ package org.apache.commons.logging.jdk14; - import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.logging.Handler; import java.util.logging.LogRecord; - /** *

Test implementation of {@code java.util.logging.Handler}.

*/ 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 ad8efa0..c4c22ce 100644 --- a/src/test/java/org/apache/commons/logging/log4j/StandardTests.java +++ b/src/test/java/org/apache/commons/logging/log4j/StandardTests.java @@ -17,7 +17,6 @@ package org.apache.commons.logging.log4j; - import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; @@ -31,7 +30,6 @@ import org.apache.commons.logging.LogFactory; import junit.framework.TestCase; - /** * Abstract set of tests that can be executed with various classpaths set. *

@@ -169,7 +167,6 @@ public abstract class StandardTests extends TestCase { checkLoggingEvents(logEvents, true); } - /** * Verify that we can log messages without exceptions. */ 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 c825609..ae914bb 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 @@ -25,7 +25,6 @@ import org.apache.commons.logging.impl.LogFactoryImpl; import junit.framework.Test; import junit.framework.TestCase; - /** * Tests for Log4J logging that emulate a webapp running within * a container where the commons-logging-api jar file is in 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 9543904..b78b7ea 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 @@ -25,7 +25,6 @@ import org.apache.commons.logging.impl.LogFactoryImpl; 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 child. diff --git a/src/test/java/org/apache/commons/logging/log4j/log4j12/TestAppender.java b/src/test/java/org/apache/commons/logging/log4j/log4j12/TestAppender.java index 90e6cad..fe824a7 100644 --- a/src/test/java/org/apache/commons/logging/log4j/log4j12/TestAppender.java +++ b/src/test/java/org/apache/commons/logging/log4j/log4j12/TestAppender.java @@ -17,7 +17,6 @@ package org.apache.commons.logging.log4j.log4j12; - import java.util.List; import org.apache.commons.logging.log4j.StandardTests; @@ -36,8 +35,6 @@ public class TestAppender extends AppenderSkeleton { // The set of logged events for this appender private final List events; - - /** * Constructor. */ @@ -45,8 +42,6 @@ public class TestAppender extends AppenderSkeleton { events = logEvents; } - - @Override protected void append(final LoggingEvent event) { final StandardTests.LogEvent lev = new StandardTests.LogEvent(); @@ -68,16 +63,13 @@ public class TestAppender extends AppenderSkeleton { events.add(lev); } - @Override public void close() { } - @Override public boolean requiresLayout() { return false; } - } 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 f1c8969..7feb9d4 100644 --- a/src/test/java/org/apache/commons/logging/logkit/StandardTestCase.java +++ b/src/test/java/org/apache/commons/logging/logkit/StandardTestCase.java @@ -17,7 +17,6 @@ package org.apache.commons.logging.logkit; - import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; @@ -38,9 +37,6 @@ import junit.framework.Test; public class StandardTestCase extends AbstractLogTest { - - - /** * Return the tests included in this test suite. */ @@ -57,15 +53,11 @@ public class StandardTestCase extends AbstractLogTest { return new PathableTestSuite(testClass, loader); } - /** *

The {@link LogFactory} implementation we have selected.

*/ protected LogFactory factory; - - - /** *

The {@link Log} implementation we have selected.

*/ @@ -99,7 +91,6 @@ public class StandardTestCase extends AbstractLogTest { return new LogKitLogger(this.getClass().getName()); } - /** * Sets up instance variables required by this test case. */ @@ -143,8 +134,6 @@ public class StandardTestCase extends AbstractLogTest { checkStandard(); } - - // Test Serializability of standard instance public void testSerializable() throws Exception { checkStandard(); diff --git a/src/test/java/org/apache/commons/logging/noop/NoOpLogTestCase.java b/src/test/java/org/apache/commons/logging/noop/NoOpLogTestCase.java index ca835a6..cabce04 100644 --- a/src/test/java/org/apache/commons/logging/noop/NoOpLogTestCase.java +++ b/src/test/java/org/apache/commons/logging/noop/NoOpLogTestCase.java @@ -81,8 +81,6 @@ public class NoOpLogTestCase extends AbstractLogTest { System.getProperties().remove("org.apache.commons.logging.Log"); } - - // Test Serializability of standard instance public void testSerializable() throws Exception { Log log = LogFactory.getLog(this.getClass().getName()); 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 25dd39a..a0a85ca 100644 --- a/src/test/java/org/apache/commons/logging/pathable/ChildFirstTestCase.java +++ b/src/test/java/org/apache/commons/logging/pathable/ChildFirstTestCase.java @@ -43,7 +43,6 @@ import junit.framework.TestCase; public class ChildFirstTestCase extends TestCase { - /** * Sets up a custom class loader hierarchy for this test case. * The hierarchy is: diff --git a/src/test/java/org/apache/commons/logging/security/MockSecurityManager.java b/src/test/java/org/apache/commons/logging/security/MockSecurityManager.java index ad9a0e1..0486fb7 100644 --- a/src/test/java/org/apache/commons/logging/security/MockSecurityManager.java +++ b/src/test/java/org/apache/commons/logging/security/MockSecurityManager.java @@ -21,7 +21,6 @@ import java.io.FilePermission; import java.security.Permission; import java.security.Permissions; - /** * Custom implementation of a security manager, so we can control the * security environment for tests in this package. 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 9a87fe9..9b39508 100644 --- a/src/test/java/org/apache/commons/logging/servlet/BasicServletTestCase.java +++ b/src/test/java/org/apache/commons/logging/servlet/BasicServletTestCase.java @@ -24,7 +24,6 @@ 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 e081bec..a11a5b2 100644 --- a/src/test/java/org/apache/commons/logging/simple/CustomConfigTestCase.java +++ b/src/test/java/org/apache/commons/logging/simple/CustomConfigTestCase.java @@ -17,7 +17,6 @@ package org.apache.commons.logging.simple; - import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -30,7 +29,6 @@ import org.apache.commons.logging.impl.SimpleLog; import junit.framework.Test; - /** *

TestCase for simple logging when running with custom configuration * properties.

@@ -204,8 +202,6 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { setUpLog("DecoratedLogger"); } - - /** * Tear down instance variables required by this test case. */ @@ -215,7 +211,6 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { expected = null; } - // Test logging message strings with exceptions public void testExceptionMessages() throws Exception { ((DecoratedSimpleLog) log).clearCache(); @@ -223,7 +218,6 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { checkExpected(); } - // Test logging plain message strings public void testPlainMessages() throws Exception { ((DecoratedSimpleLog) log).clearCache(); @@ -231,7 +225,6 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { checkExpected(); } - // Test Serializability of standard instance @Override public void testSerializable() throws Exception { 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 df94b57..cc80518 100644 --- a/src/test/java/org/apache/commons/logging/simple/DateTimeCustomConfigTestCase.java +++ b/src/test/java/org/apache/commons/logging/simple/DateTimeCustomConfigTestCase.java @@ -26,13 +26,11 @@ import org.apache.commons.logging.PathableTestSuite; import junit.framework.Test; - /** * Tests custom date time format configuration */ public class DateTimeCustomConfigTestCase extends CustomConfigTestCase { - /** * Return the tests included in this test suite. *

@@ -57,7 +55,6 @@ public class DateTimeCustomConfigTestCase extends CustomConfigTestCase { return new PathableTestSuite(testClass, loader); } - /** Checks that the date time format has been successfully set */ @Override protected void checkDecoratedDateTime() { @@ -77,8 +74,6 @@ public class DateTimeCustomConfigTestCase extends CustomConfigTestCase { assertTrue(((DecoratedSimpleLog) log).getShowDateTime()); } - - /** * Sets up system properties required by this unit test. Here, we * set up the props defined in the parent class setProperties method, diff --git a/src/test/java/org/apache/commons/logging/simple/DecoratedSimpleLog.java b/src/test/java/org/apache/commons/logging/simple/DecoratedSimpleLog.java index 2f59138..4f6c800 100644 --- a/src/test/java/org/apache/commons/logging/simple/DecoratedSimpleLog.java +++ b/src/test/java/org/apache/commons/logging/simple/DecoratedSimpleLog.java @@ -17,14 +17,12 @@ package org.apache.commons.logging.simple; - import java.text.DateFormat; import java.util.ArrayList; import java.util.List; import org.apache.commons.logging.impl.SimpleLog; - /** *

Decorated instance of SimpleLog to expose internal state and * support buffered output.

@@ -32,9 +30,6 @@ import org.apache.commons.logging.impl.SimpleLog; public class DecoratedSimpleLog extends SimpleLog { - - - /** * Generated serial version ID. */ @@ -43,54 +38,40 @@ public class DecoratedSimpleLog extends SimpleLog { // Cache of logged records protected ArrayList cache = new ArrayList(); - - public DecoratedSimpleLog(final String name) { super(name); } - // Clear cache public void clearCache() { cache.clear(); } - // Return cache public List getCache() { return this.cache; } - public String getDateTimeFormat() { return dateTimeFormat; } - public DateFormat getDateTimeFormatter() { return dateFormatter; } - - - public String getLogName() { return logName; } - - - public boolean getShowDateTime() { return showDateTime; } - public boolean getShowShortName() { return showShortName; } - // Cache logged messages @Override protected void log(final int type, final Object message, final Throwable t) { @@ -100,5 +81,4 @@ public class DecoratedSimpleLog extends SimpleLog { } - } 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 c002a4c..281edde 100644 --- a/src/test/java/org/apache/commons/logging/simple/DefaultConfigTestCase.java +++ b/src/test/java/org/apache/commons/logging/simple/DefaultConfigTestCase.java @@ -17,7 +17,6 @@ package org.apache.commons.logging.simple; - import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; @@ -32,7 +31,6 @@ import org.apache.commons.logging.impl.SimpleLog; import junit.framework.Test; import junit.framework.TestCase; - /** *

TestCase for simple logging when running with zero configuration * other than selecting the SimpleLog implementation.

@@ -167,14 +165,12 @@ public class DefaultConfigTestCase extends TestCase { LogFactory.releaseAll(); } - // Test pristine DecoratedSimpleLog instance public void testPristineDecorated() { setUpDecorated("DecoratedLogger"); checkDecorated(); } - // Test pristine LogFactory instance public void testPristineFactory() { assertNotNull("LogFactory exists", factory); @@ -187,13 +183,11 @@ public class DefaultConfigTestCase extends TestCase { assertEquals("Names empty", 0, names.length); } - // Test pristine Log instance public void testPristineLog() { checkStandard(); } - // Test Serializability of standard instance public void testSerializable() throws Exception { diff --git a/src/test/java/org/apache/commons/logging/simple/LogRecord.java b/src/test/java/org/apache/commons/logging/simple/LogRecord.java index 5099080..42bc60c 100644 --- a/src/test/java/org/apache/commons/logging/simple/LogRecord.java +++ b/src/test/java/org/apache/commons/logging/simple/LogRecord.java @@ -15,16 +15,12 @@ * limitations under the License. */ - package org.apache.commons.logging.simple; - import java.io.Serializable; - public class LogRecord implements Serializable { - /** * Generated serial version ID. */ 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 b34d966..9a52c3b 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 @@ -17,7 +17,6 @@ package org.apache.commons.logging.tccl.log; - import java.net.URL; import org.apache.commons.logging.Log; @@ -29,7 +28,6 @@ import org.apache.commons.logging.PathableTestSuite; import junit.framework.Test; import junit.framework.TestCase; - /** * Verify that by default LogFactoryImpl is loaded from the tccl class loader. */ @@ -42,7 +40,6 @@ public class TcclDisabledTestCase extends TestCase { public static final String MY_LOG_IMPL = MY_LOG_PKG + ".MyLog"; - /** * Return the tests included in this test suite. */ @@ -103,7 +100,6 @@ public class TcclDisabledTestCase extends TestCase { LogFactory.releaseAll(); } - /** * Verify that MyLog is only loadable via the tccl. */ 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 9f1fc57..3aea5e5 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 @@ -17,7 +17,6 @@ package org.apache.commons.logging.tccl.log; - import java.net.URL; import org.apache.commons.logging.Log; @@ -28,7 +27,6 @@ import org.apache.commons.logging.PathableTestSuite; import junit.framework.Test; import junit.framework.TestCase; - /** * Verify that by default the standard LogFactoryImpl class loads a * custom Log implementation via the TCCL. @@ -42,7 +40,6 @@ public class TcclEnabledTestCase extends TestCase { public static final String MY_LOG_IMPL = MY_LOG_PKG + ".MyLog"; - /** * Return the tests included in this test suite. */ @@ -103,7 +100,6 @@ public class TcclEnabledTestCase extends TestCase { LogFactory.releaseAll(); } - /** * Verify that MyLogFactoryImpl is only loadable via the tccl. */ 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 aa35d18..df9634e 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 @@ -17,7 +17,6 @@ package org.apache.commons.logging.tccl.logfactory; - import java.net.URL; import org.apache.commons.logging.LogFactory; @@ -27,7 +26,6 @@ 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 * LogFactoryImpl being loaded from the tccl class loader. @@ -41,8 +39,6 @@ public class TcclDisabledTestCase extends TestCase { public static final String MY_LOG_FACTORY_IMPL = MY_LOG_FACTORY_PKG + ".MyLogFactoryImpl"; - - /** * Return the tests included in this test suite. */ @@ -105,7 +101,6 @@ public class TcclDisabledTestCase extends TestCase { LogFactory.releaseAll(); } - /** * Verify that MyLogFactoryImpl is only loadable via the tccl. */ 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 05f15e4..0088070 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 @@ -17,7 +17,6 @@ package org.apache.commons.logging.tccl.logfactory; - import java.net.URL; import org.apache.commons.logging.LogFactory; @@ -27,7 +26,6 @@ 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 * tccl class loader. @@ -35,8 +33,6 @@ import junit.framework.TestCase; public class TcclEnabledTestCase extends TestCase { - - /** * Return the tests included in this test suite. */ @@ -99,7 +95,6 @@ public class TcclEnabledTestCase extends TestCase { LogFactory.releaseAll(); } - /** * Verify that MyLogFactoryImpl is only loadable via the tccl. */