This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-logging.git
commit 12ae9e6324af0371779eb221b7f602830e67c169 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sun Nov 19 09:51:16 2023 -0500 Remove obsolete comments Move static block --- .../org/apache/commons/logging/LogFactory.java | 108 ++++++++++----------- .../java/org/apache/commons/logging/LogSource.java | 12 +-- .../logging/impl/Jdk13LumberjackLogger.java | 9 +- .../apache/commons/logging/impl/Jdk14Logger.java | 3 +- .../apache/commons/logging/impl/Log4JLogger.java | 65 ++++++------- .../commons/logging/impl/LogFactoryImpl.java | 21 ++-- .../apache/commons/logging/impl/LogKitLogger.java | 12 +-- .../org/apache/commons/logging/impl/SimpleLog.java | 24 ++--- .../config/FirstPriorityConfigTestCase.java | 6 +- .../logging/config/PriorityConfigTestCase.java | 6 +- .../logging/jdk14/CustomConfigTestCase.java | 15 +-- .../logging/log4j/log4j12/TestAppender.java | 6 +- .../commons/logging/logkit/StandardTestCase.java | 12 +-- .../commons/logging/noop/NoOpLogTestCase.java | 3 +- .../simple/DateTimeCustomConfigTestCase.java | 6 +- .../commons/logging/simple/DecoratedSimpleLog.java | 12 +-- .../logging/tccl/log/TcclDisabledTestCase.java | 6 +- .../logging/tccl/log/TcclEnabledTestCase.java | 6 +- .../tccl/logfactory/TcclDisabledTestCase.java | 6 +- .../tccl/logfactory/TcclEnabledTestCase.java | 6 +- 20 files changed, 138 insertions(+), 206 deletions(-) diff --git a/src/main/java/org/apache/commons/logging/LogFactory.java b/src/main/java/org/apache/commons/logging/LogFactory.java index f5b3baf..a024670 100644 --- a/src/main/java/org/apache/commons/logging/LogFactory.java +++ b/src/main/java/org/apache/commons/logging/LogFactory.java @@ -68,8 +68,7 @@ public abstract class LogFactory { // lib and JCL have the necessary permissions even when the untrusted // caller does not. That's a pretty hard route to exploit though. - // ----------------------------------------------------- Manifest Constants - + /** * The name ({@code priority}) of the key in the config file used to * specify the priority of that particular config file. The associated value @@ -203,16 +202,14 @@ public abstract class LogFactory { */ private static final int MAX_BROKEN_SERVICES = 3; - // ----------------------------------------------------------- Constructors - + /** * The previously constructed {@code LogFactory} instances, keyed by * the {@code ClassLoader} with which it was created. */ protected static Hashtable factories; - // --------------------------------------------------------- Public Methods - + /** * Previously constructed {@code LogFactory} instance as in the * {@code factories} map, but for the case where @@ -231,39 +228,6 @@ public abstract class LogFactory { @Deprecated protected static volatile LogFactory nullClassLoaderFactory; - static { - // note: it's safe to call methods before initDiagnostics (though - // diagnostic output gets discarded). - final ClassLoader thisClassLoader = getClassLoader(LogFactory.class); - thisClassLoaderRef = new WeakReference<>(thisClassLoader); - // In order to avoid confusion where multiple instances of JCL are - // being used via different classloaders within the same app, we - // ensure each logged message has a prefix of form - // [LogFactory from classloader OID] - // - // Note that this prefix should be kept consistent with that - // in LogFactoryImpl. However here we don't need to output info - // about the actual *instance* of LogFactory, as all methods that - // output diagnostics from this class are static. - String classLoaderName; - try { - if (thisClassLoader == null) { - classLoaderName = "BOOTLOADER"; - } else { - classLoaderName = objectId(thisClassLoader); - } - } catch (final SecurityException e) { - classLoaderName = "UNKNOWN"; - } - diagnosticPrefix = "[LogFactory from " + classLoaderName + "] "; - DIAGNOSTICS_STREAM = initDiagnostics(); - logClassLoaderEnvironment(LogFactory.class); - factories = createFactoryStore(); - if (isDiagnosticsEnabled()) { - logDiagnostic("BOOTSTRAP COMPLETED"); - } - } - /** * Remember this factory, so later calls to LogFactory.getCachedFactory * can return the previously created object (together with all its @@ -567,8 +531,7 @@ public abstract class LogFactory { return (LogFactory) factories.get(contextClassLoader); } - // ------------------------------------------------------- Static Variables - + /** * Safely get access to the classloader for the specified class. * <p> @@ -728,8 +691,7 @@ public abstract class LogFactory { return directGetContextClassLoader(); } - // --------------------------------------------------------- Static Methods - + /** * Calls LogFactory.directGetContextClassLoader under the control of an * AccessController class. This means that java code running under a @@ -1142,8 +1104,7 @@ public abstract class LogFactory { (PrivilegedAction) () -> System.getProperty(key, def)); } - // ------------------------------------------------------ Protected Methods - + /** * Checks whether the supplied Throwable is one that needs to be * re-thrown and ignores all others. @@ -1656,9 +1617,18 @@ public abstract class LogFactory { * @param name Name of the attribute to remove */ public abstract void removeAttribute(String name); + + /** + * Sets the configuration attribute with the specified name. Calling + * this with a {@code null} value is equivalent to calling + * {@code removeAttribute(name)}. + * + * @param name Name of the attribute to set + * @param value Value of the attribute to set, or {@code null} + * to remove any setting for this attribute + */ + public abstract void setAttribute(String name, Object value); - // ---------------------------------------------------------------------- - // Static initializer block to perform initialization at class load time. // // We can't do this in the class constructor, as there are many // static methods on this class that can be called before any @@ -1674,16 +1644,38 @@ public abstract class LogFactory { // // So the wisest thing to do is just to place this code at the very end // of the class file. - // ---------------------------------------------------------------------- - /** - * Sets the configuration attribute with the specified name. Calling - * this with a {@code null} value is equivalent to calling - * {@code removeAttribute(name)}. - * - * @param name Name of the attribute to set - * @param value Value of the attribute to set, or {@code null} - * to remove any setting for this attribute - */ - public abstract void setAttribute(String name, Object value); + static { + // note: it's safe to call methods before initDiagnostics (though + // diagnostic output gets discarded). + final ClassLoader thisClassLoader = getClassLoader(LogFactory.class); + thisClassLoaderRef = new WeakReference<>(thisClassLoader); + // In order to avoid confusion where multiple instances of JCL are + // being used via different classloaders within the same app, we + // ensure each logged message has a prefix of form + // [LogFactory from classloader OID] + // + // Note that this prefix should be kept consistent with that + // in LogFactoryImpl. However here we don't need to output info + // about the actual *instance* of LogFactory, as all methods that + // output diagnostics from this class are static. + String classLoaderName; + try { + if (thisClassLoader == null) { + classLoaderName = "BOOTLOADER"; + } else { + classLoaderName = objectId(thisClassLoader); + } + } catch (final SecurityException e) { + classLoaderName = "UNKNOWN"; + } + diagnosticPrefix = "[LogFactory from " + classLoaderName + "] "; + DIAGNOSTICS_STREAM = initDiagnostics(); + logClassLoaderEnvironment(LogFactory.class); + factories = createFactoryStore(); + if (isDiagnosticsEnabled()) { + logDiagnostic("BOOTSTRAP COMPLETED"); + } + } + } diff --git a/src/main/java/org/apache/commons/logging/LogSource.java b/src/main/java/org/apache/commons/logging/LogSource.java index 3201331..ca3444a 100644 --- a/src/main/java/org/apache/commons/logging/LogSource.java +++ b/src/main/java/org/apache/commons/logging/LogSource.java @@ -53,8 +53,7 @@ import org.apache.commons.logging.impl.NoOpLog; @Deprecated public class LogSource { - // ------------------------------------------------------- Class Attributes - + /** * Logs. */ @@ -74,8 +73,7 @@ public class LogSource { */ private static final String[] EMPTY_STRING_ARRAY = {}; - // ----------------------------------------------------- Class Initializers - + static { // Is Log4J Available? @@ -132,8 +130,7 @@ public class LogSource { } - // ------------------------------------------------------------ Constructor - + /** * Gets a {@code Log} instance by class. * @@ -144,8 +141,7 @@ public class LogSource { return getInstance(clazz.getName()); } - // ---------------------------------------------------------- Class Methods - + /** * Gets a {@code Log} instance by class name. * 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 7aab178..317e111 100644 --- a/src/main/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java +++ b/src/main/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java @@ -41,8 +41,7 @@ public class Jdk13LumberjackLogger implements Log, Serializable { /** Serializable version identifier. */ private static final long serialVersionUID = -8649807923527610591L; - // ----------------------------------------------------- Instance Variables - + /** * This member variable simply ensures that any attempt to initialize * this class in a pre-1.4 JVM will result in an ExceptionInInitializerError. @@ -70,8 +69,7 @@ public class Jdk13LumberjackLogger implements Log, Serializable { /** Class and method found flag. */ private boolean classAndMethodFound; - // ----------------------------------------------------------- Constructors - + /** * Constructs a named instance of this Logger. * @@ -82,8 +80,7 @@ public class Jdk13LumberjackLogger implements Log, Serializable { logger = getLogger(); } - // --------------------------------------------------------- Public Methods - + /** * 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 80c4c09..f866ce1 100644 --- a/src/main/java/org/apache/commons/logging/impl/Jdk14Logger.java +++ b/src/main/java/org/apache/commons/logging/impl/Jdk14Logger.java @@ -41,8 +41,7 @@ public class Jdk14Logger implements Log, Serializable { */ protected static final Level dummyLevel = Level.FINE; - // ----------------------------------------------------------- Constructors - + /** * The underlying Logger implementation we are using. */ diff --git a/src/main/java/org/apache/commons/logging/impl/Log4JLogger.java b/src/main/java/org/apache/commons/logging/impl/Log4JLogger.java index 90ffca4..59c3ee3 100644 --- a/src/main/java/org/apache/commons/logging/impl/Log4JLogger.java +++ b/src/main/java/org/apache/commons/logging/impl/Log4JLogger.java @@ -53,43 +53,9 @@ public class Log4JLogger implements Log, Serializable { private static final Priority traceLevel; - static { - if (!Priority.class.isAssignableFrom(Level.class)) { - // nope, this is log4j 1.3, so force an ExceptionInInitializerError - throw new InstantiationError("Log4J 1.2 not available"); - } - - // Releases of log4j1.2 >= 1.2.12 have Priority.TRACE available, earlier - // versions do not. If TRACE is not available, then we have to map - // calls to Log.trace(...) onto the DEBUG level. - - Priority _traceLevel; - try { - _traceLevel = (Priority) Level.class.getDeclaredField("TRACE").get(null); - } catch (final Exception ex) { - // ok, trace not available - _traceLevel = Level.DEBUG; - } - traceLevel = _traceLevel; - } - /** Log to this logger */ private transient volatile Logger logger; - // ------------------------------------------------------------ - // Static Initializer. - // - // Note that this must come after the static variable declarations - // otherwise initializer expressions associated with those variables - // will override any settings done here. - // - // Verify that log4j is available, and that it is version 1.2. - // If an ExceptionInInitializerError is generated, then LogFactoryImpl - // will treat that as meaning that the appropriate underlying logging - // library is just not present - if discovery is in progress then - // discovery will continue. - // ------------------------------------------------------------ - /** Logger name */ private final String name; @@ -333,4 +299,35 @@ public class Log4JLogger implements Log, Serializable { public void warn(final Object message, final Throwable t) { getLogger().log(FQCN, Level.WARN, message, t); } + + // + // Note that this must come after the static variable declarations + // otherwise initializer expressions associated with those variables + // will override any settings done here. + // + // Verify that log4j is available, and that it is version 1.2. + // If an ExceptionInInitializerError is generated, then LogFactoryImpl + // will treat that as meaning that the appropriate underlying logging + // library is just not present - if discovery is in progress then + // discovery will continue. + static { + if (!Priority.class.isAssignableFrom(Level.class)) { + // nope, this is log4j 1.3, so force an ExceptionInInitializerError + throw new InstantiationError("Log4J 1.2 not available"); + } + + // Releases of log4j1.2 >= 1.2.12 have Priority.TRACE available, earlier + // versions do not. If TRACE is not available, then we have to map + // calls to Log.trace(...) onto the DEBUG level. + + Priority _traceLevel; + try { + _traceLevel = (Priority) Level.class.getDeclaredField("TRACE").get(null); + } catch (final Exception ex) { + // ok, trace not available + _traceLevel = Level.DEBUG; + } + traceLevel = _traceLevel; + } + } 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 2d7d01f..be3ffab 100644 --- a/src/main/java/org/apache/commons/logging/impl/LogFactoryImpl.java +++ b/src/main/java/org/apache/commons/logging/impl/LogFactoryImpl.java @@ -80,16 +80,14 @@ public class LogFactoryImpl extends LogFactory { */ private static final String[] EMPTY_STRING_ARRAY = {}; - // ----------------------------------------------------------- Constructors - + /** * 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"; - // ----------------------------------------------------- Manifest Constants - + /** * The deprecated system property used for backwards compatibility with * old versions of JCL. @@ -169,8 +167,7 @@ public class LogFactoryImpl extends LogFactory { return LogFactory.getClassLoader(clazz); } - // ----------------------------------------------------- Instance Variables - + /** * Gets the context ClassLoader. * This method is a workaround for a java 1.2 compiler bug. @@ -280,8 +277,7 @@ public class LogFactoryImpl extends LogFactory { */ protected Class[] logConstructorSignature = { String.class }; - // --------------------------------------------------------- Public Methods - + /** * The one-argument {@code setLogFactory} method of the selected * {@link org.apache.commons.logging.Log} method, if it exists. @@ -492,13 +488,11 @@ public class LogFactoryImpl extends LogFactory { return logAdapter; } - // ------------------------------------------------------ - // Static Methods + // Static Methods // // These methods only defined as workarounds for a java 1.2 bug; // theoretically none of these are needed. - // ------------------------------------------------------ - + /** * Attempts to create a Log instance for the given category name. * Follows the discovery process described in the class javadoc. @@ -664,8 +658,7 @@ public class LogFactoryImpl extends LogFactory { return attributes.get(name); } - // ------------------------------------------------------ Protected Methods - + /** * Return an array containing the names of all currently defined * configuration attributes. If there are no such attributes, a zero 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 354278d..f429794 100644 --- a/src/main/java/org/apache/commons/logging/impl/LogKitLogger.java +++ b/src/main/java/org/apache/commons/logging/impl/LogKitLogger.java @@ -40,16 +40,14 @@ public class LogKitLogger implements Log, Serializable { /** Serializable version identifier. */ private static final long serialVersionUID = 3768538055836059519L; - // ------------------------------------------------------------- Attributes - + /** Logging goes to this {@code LogKit} logger */ protected transient volatile Logger logger; /** Name of this logger */ protected String name; - // ------------------------------------------------------------ Constructor - + /** * Constructs {@code LogKitLogger} which wraps the {@code LogKit} * logger with given name. @@ -61,8 +59,7 @@ public class LogKitLogger implements Log, Serializable { this.logger = getLogger(); } - // --------------------------------------------------------- Public Methods - + /** * Logs a message with {@code org.apache.log.Priority.DEBUG}. * @@ -76,8 +73,7 @@ public class LogKitLogger implements Log, Serializable { } } - // ----------------------------------------------------- Log Implementation - + /** * 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 4e47c5f..f1b4225 100644 --- a/src/main/java/org/apache/commons/logging/impl/SimpleLog.java +++ b/src/main/java/org/apache/commons/logging/impl/SimpleLog.java @@ -74,8 +74,7 @@ public class SimpleLog implements Log, Serializable { /** Serializable version identifier. */ private static final long serialVersionUID = 136942970684951178L; - // ------------------------------------------------------- Class Attributes - + /** All system properties used by {@code SimpleLog} start with this */ static protected final String systemPrefix = "org.apache.commons.logging.simplelog."; @@ -111,8 +110,7 @@ public class SimpleLog implements Log, Serializable { */ static protected DateFormat dateFormatter; - // ---------------------------------------------------- Log Level Constants - + /** "Trace" level logging. */ public static final int LOG_LEVEL_TRACE = 1; /** "Debug" level logging. */ @@ -132,8 +130,7 @@ public class SimpleLog implements Log, Serializable { /** Enable no logging levels */ public static final int LOG_LEVEL_OFF = LOG_LEVEL_FATAL + 1; - // ------------------------------------------------------------ Initializer - + // Initialize class attributes. // Load properties file, if found. // Override with system properties. @@ -247,8 +244,7 @@ public class SimpleLog implements Log, Serializable { }); } - // ------------------------------------------------------------- Attributes - + private static String getStringProperty(final String name) { String prop = null; try { @@ -265,13 +261,11 @@ public class SimpleLog implements Log, Serializable { /** The name of this simple log instance */ protected volatile String logName; - // ------------------------------------------------------------ Constructor - + /** The current log level */ protected volatile int currentLogLevel; - // -------------------------------------------------------- Properties - + /** The short name of this simple log instance */ private volatile String shortLogName; @@ -320,8 +314,7 @@ public class SimpleLog implements Log, Serializable { } } - // -------------------------------------------------------- Logging Methods - + /** * Logs a message with * {@code org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_DEBUG}. @@ -378,8 +371,7 @@ public class SimpleLog implements Log, Serializable { } } - // -------------------------------------------------------- Log Implementation - + /** * Log a message with {@code org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_FATAL}. * 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 76b5ca7..70d33ba 100644 --- a/src/test/java/org/apache/commons/logging/config/FirstPriorityConfigTestCase.java +++ b/src/test/java/org/apache/commons/logging/config/FirstPriorityConfigTestCase.java @@ -41,8 +41,7 @@ import junit.framework.TestCase; */ public class FirstPriorityConfigTestCase extends TestCase { - // ------------------------------------------- JUnit Infrastructure Methods - + /** * Return the tests included in this test suite. @@ -100,8 +99,7 @@ public class FirstPriorityConfigTestCase extends TestCase { LogFactory.releaseAll(); } - // ----------------------------------------------------------- Test Methods - + /** * 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 2609f48..4019bc5 100644 --- a/src/test/java/org/apache/commons/logging/config/PriorityConfigTestCase.java +++ b/src/test/java/org/apache/commons/logging/config/PriorityConfigTestCase.java @@ -48,8 +48,7 @@ import junit.framework.TestCase; public class PriorityConfigTestCase extends TestCase { - // ------------------------------------------- JUnit Infrastructure Methods - + /** * Return the tests included in this test suite. @@ -118,8 +117,7 @@ public class PriorityConfigTestCase extends TestCase { LogFactory.releaseAll(); } - // ----------------------------------------------------------- Test Methods - + /** * 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/jdk14/CustomConfigTestCase.java b/src/test/java/org/apache/commons/logging/jdk14/CustomConfigTestCase.java index 0e33e1c..7cc4c2e 100644 --- a/src/test/java/org/apache/commons/logging/jdk14/CustomConfigTestCase.java +++ b/src/test/java/org/apache/commons/logging/jdk14/CustomConfigTestCase.java @@ -45,8 +45,7 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { protected static final String HANDLER_NAME = "org.apache.commons.logging.jdk14.TestHandler"; - // ----------------------------------------------------------- Constructors - + /** * Make a class available in the system classloader even when its classfile is @@ -84,8 +83,7 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { } - // ----------------------------------------------------- Instance Variables - + /** * Given the name of a class that is somewhere in the classpath of the provided @@ -157,8 +155,7 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { protected LogManager manager; - // ------------------------------------------- JUnit Infrastructure Methods - + /** * <p>The message levels that should have been logged.</p> @@ -237,8 +234,7 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { } - // ----------------------------------------------------------- Test Methods - + // Log the messages with exceptions protected void logExceptionMessages() { @@ -311,8 +307,7 @@ public class CustomConfigTestCase extends DefaultConfigTestCase { } - // -------------------------------------------------------- Support Methods - + // Set up LogManager instance protected void setUpManager(final String config) throws Exception { 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 b5a42a0..4a9ac63 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 @@ -36,8 +36,7 @@ public class TestAppender extends AppenderSkeleton { // The set of logged events for this appender private final List events; - // ----------------------------------------------------- Instance Variables - + /** * Constructor. @@ -47,8 +46,7 @@ public class TestAppender extends AppenderSkeleton { } - // ------------------------------------------------------- Appender Methods - + @Override protected void append(final LoggingEvent event) { final StandardTests.LogEvent lev = new StandardTests.LogEvent(); 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 aed7ade..1000a71 100644 --- a/src/test/java/org/apache/commons/logging/logkit/StandardTestCase.java +++ b/src/test/java/org/apache/commons/logging/logkit/StandardTestCase.java @@ -39,8 +39,7 @@ import junit.framework.Test; public class StandardTestCase extends AbstractLogTest { - // ----------------------------------------------------- Instance Variables - + /** * Return the tests included in this test suite. @@ -65,8 +64,7 @@ public class StandardTestCase extends AbstractLogTest { protected LogFactory factory; - // ------------------------------------------- JUnit Infrastructure Methods - + /** * <p>The {@link Log} implementation we have selected.</p> @@ -101,8 +99,7 @@ public class StandardTestCase extends AbstractLogTest { return new LogKitLogger(this.getClass().getName()); } - // ----------------------------------------------------------- Test Methods - + /** * Sets up instance variables required by this test case. */ @@ -147,8 +144,7 @@ public class StandardTestCase extends AbstractLogTest { } - // -------------------------------------------------------- Support Methods - + // 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 868d02a..717137f 100644 --- a/src/test/java/org/apache/commons/logging/noop/NoOpLogTestCase.java +++ b/src/test/java/org/apache/commons/logging/noop/NoOpLogTestCase.java @@ -83,8 +83,7 @@ public class NoOpLogTestCase extends AbstractLogTest } - // -------------------------------------------------------- Support Methods - + // 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/simple/DateTimeCustomConfigTestCase.java b/src/test/java/org/apache/commons/logging/simple/DateTimeCustomConfigTestCase.java index 21e914e..6c880e7 100644 --- a/src/test/java/org/apache/commons/logging/simple/DateTimeCustomConfigTestCase.java +++ b/src/test/java/org/apache/commons/logging/simple/DateTimeCustomConfigTestCase.java @@ -32,8 +32,7 @@ import junit.framework.Test; */ public class DateTimeCustomConfigTestCase extends CustomConfigTestCase { - // ----------------------------------------------------------- Constructors - + /** * Return the tests included in this test suite. * <p> @@ -79,8 +78,7 @@ public class DateTimeCustomConfigTestCase extends CustomConfigTestCase { } - // ----------------------------------------------------------- Methods - + /** * 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 6aaa317..ef33552 100644 --- a/src/test/java/org/apache/commons/logging/simple/DecoratedSimpleLog.java +++ b/src/test/java/org/apache/commons/logging/simple/DecoratedSimpleLog.java @@ -33,8 +33,7 @@ import org.apache.commons.logging.impl.SimpleLog; public class DecoratedSimpleLog extends SimpleLog { - // ------------------------------------------------------------ Constructor - + /** * Generated serial version ID. @@ -45,8 +44,7 @@ public class DecoratedSimpleLog extends SimpleLog { protected ArrayList cache = new ArrayList(); - // ------------------------------------------------------------- Properties - + public DecoratedSimpleLog(final String name) { super(name); } @@ -74,16 +72,14 @@ public class DecoratedSimpleLog extends SimpleLog { } - // ------------------------------------------------------- Protected Methods - + public String getLogName() { return logName; } - // ---------------------------------------------------------- Public Methods - + public boolean getShowDateTime() { return showDateTime; 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 5a9adf2..7d94d46 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 @@ -42,8 +42,7 @@ public class TcclDisabledTestCase extends TestCase { public static final String MY_LOG_IMPL = MY_LOG_PKG + ".MyLog"; - // ------------------------------------------- JUnit Infrastructure Methods - + /** * Return the tests included in this test suite. */ @@ -104,8 +103,7 @@ public class TcclDisabledTestCase extends TestCase { LogFactory.releaseAll(); } - // ----------------------------------------------------------- Test Methods - + /** * 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 2c9e1f8..c4a9d6b 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 @@ -42,8 +42,7 @@ public class TcclEnabledTestCase extends TestCase { public static final String MY_LOG_IMPL = MY_LOG_PKG + ".MyLog"; - // ------------------------------------------- JUnit Infrastructure Methods - + /** * Return the tests included in this test suite. */ @@ -104,8 +103,7 @@ public class TcclEnabledTestCase extends TestCase { LogFactory.releaseAll(); } - // ----------------------------------------------------------- Test Methods - + /** * 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 e7d7af2..2e5038b 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 @@ -41,8 +41,7 @@ public class TcclDisabledTestCase extends TestCase { public static final String MY_LOG_FACTORY_IMPL = MY_LOG_FACTORY_PKG + ".MyLogFactoryImpl"; - // ------------------------------------------- JUnit Infrastructure Methods - + /** * Return the tests included in this test suite. @@ -106,8 +105,7 @@ public class TcclDisabledTestCase extends TestCase { LogFactory.releaseAll(); } - // ----------------------------------------------------------- Test Methods - + /** * 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 b2e9326..999f74b 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 @@ -35,8 +35,7 @@ import junit.framework.TestCase; public class TcclEnabledTestCase extends TestCase { - // ------------------------------------------- JUnit Infrastructure Methods - + /** * Return the tests included in this test suite. @@ -100,8 +99,7 @@ public class TcclEnabledTestCase extends TestCase { LogFactory.releaseAll(); } - // ----------------------------------------------------------- Test Methods - + /** * Verify that MyLogFactoryImpl is only loadable via the tccl. */