Remove extra blank lines
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
* limitations under the license.
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.commons.logging;
|
||||
|
||||
import java.io.Closeable;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.commons.logging;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.commons.logging.impl;
|
||||
|
||||
import java.lang.ref.ReferenceQueue;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
/**
|
||||
* <p>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);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <p>The customized {@code Handler} we will be using.</p>
|
||||
*/
|
||||
protected TestHandler handler;
|
||||
|
||||
|
||||
/**
|
||||
* <p>The underlying {@code Handler}s we will be using.</p>
|
||||
*/
|
||||
protected Handler handlers[];
|
||||
|
||||
|
||||
/**
|
||||
* <p>The underlying {@code Logger} we will be using.</p>
|
||||
*/
|
||||
protected Logger logger;
|
||||
|
||||
|
||||
/**
|
||||
* <p>The underlying {@code LogManager} we will be using.</p>
|
||||
*/
|
||||
protected LogManager manager;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* <p>The message levels that should have been logged.</p>
|
||||
*/
|
||||
@@ -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 {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
/**
|
||||
* <p>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.
|
||||
*/
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
/**
|
||||
* <p>Test implementation of {@code java.util.logging.Handler}.</p>
|
||||
*/
|
||||
|
||||
@@ -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.
|
||||
* <p>
|
||||
@@ -169,7 +167,6 @@ public abstract class StandardTests extends TestCase {
|
||||
checkLoggingEvents(logEvents, true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Verify that we can log messages without exceptions.
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <p>The {@link LogFactory} implementation we have selected.</p>
|
||||
*/
|
||||
protected LogFactory factory;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* <p>The {@link Log} implementation we have selected.</p>
|
||||
*/
|
||||
@@ -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();
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -24,7 +24,6 @@ import org.apache.commons.logging.impl.ServletContextCleaner;
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
|
||||
/**
|
||||
* Tests for ServletContextCleaner utility class.
|
||||
*/
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
/**
|
||||
* <p>TestCase for simple logging when running with custom configuration
|
||||
* properties.</p>
|
||||
@@ -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 {
|
||||
|
||||
@@ -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.
|
||||
* <p>
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
/**
|
||||
* <p>Decorated instance of SimpleLog to expose internal state and
|
||||
* support buffered output.</p>
|
||||
@@ -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 {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
/**
|
||||
* <p>TestCase for simple logging when running with zero configuration
|
||||
* other than selecting the SimpleLog implementation.</p>
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user