logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carn...@apache.org
Subject svn commit: r925947 - in /logging/log4j/trunk: src/changes/ tests/src/java/org/apache/log4j/ tests/src/java/org/apache/log4j/customLogger/ tests/src/java/org/apache/log4j/defaultInit/ tests/src/java/org/apache/log4j/helpers/ tests/src/java/org/apache/l...
Date Mon, 22 Mar 2010 03:37:09 GMT
Author: carnold
Date: Mon Mar 22 03:37:08 2010
New Revision: 925947

URL: http://svn.apache.org/viewvc?rev=925947&view=rev
Log:
Bug 48953: Unused imports and variables in test code cause gcj compile warnings

Modified:
    logging/log4j/trunk/src/changes/changes.xml
    logging/log4j/trunk/tests/src/java/org/apache/log4j/AsyncAppenderTestCase.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/DRFATestCase.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/EnhancedPatternLayoutTestCase.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/FileAppenderTest.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/HTMLLayoutTest.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/HierarchyThresholdTestCase.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/LevelTest.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/LoggerTestCase.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/MinimumTestCase.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/PropertyConfiguratorTest.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/VectorAppender.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/customLogger/XLogger.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/customLogger/XLoggerTestCase.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/defaultInit/TestCase1.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/defaultInit/TestCase2.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/defaultInit/TestCase3.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/defaultInit/TestCase4.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/BoundedFIFOTestCase.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/CyclicBufferTestCase.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/DateLayoutTest.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/OptionConverterTestCase.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/net/SocketAppenderTest.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/net/SocketServerTestCase.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/net/SyslogAppenderTest.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/or/ORTestCase.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/pattern/CachedDateFormatTest.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/pattern/PatternParserTest.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/spi/LoggingEventTest.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/spi/ThrowableInformationTest.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/util/AbsoluteDateAndTimeFilter.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/util/AbsoluteTimeFilter.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/util/Transformer.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/varia/ERFATestCase.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/xml/DOMTestCase.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/xml/XMLLayoutTest.java

Modified: logging/log4j/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/changes/changes.xml?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/src/changes/changes.xml (original)
+++ logging/log4j/trunk/src/changes/changes.xml Mon Mar 22 03:37:08 2010
@@ -97,6 +97,7 @@
        <action action="add" issue="49812">Add parameterized logging utility classes
LogMF and LogSF from extras companion.</action>
        <action action="add" issue="48927">Add EnhancedPatternLayout from extras companion.</action>
        <action action="fix" issue="48784">Links to example code broken in the JavaDocs</action>
+       <action action="fix" issue="48953">Unused imports and variables in test code
cause gcj compile warnings.</action>
     </release>
 
   

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/AsyncAppenderTestCase.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/AsyncAppenderTestCase.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/AsyncAppenderTestCase.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/AsyncAppenderTestCase.java Mon Mar
22 03:37:08 2010
@@ -18,14 +18,10 @@
 package org.apache.log4j;
 
 import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import junit.framework.Test;
 
 import java.util.Vector;
 
-import org.apache.log4j.*;
 import org.apache.log4j.spi.LoggingEvent;
-import org.apache.log4j.varia.NullAppender;
 
 /**
    A superficial but general test of log4j.
@@ -46,7 +42,6 @@ public class AsyncAppenderTestCase exten
   // this test checks whether it is possible to write to a closed AsyncAppender
   public void closeTest() throws Exception {    
     Logger root = Logger.getRootLogger();
-    Layout layout = new SimpleLayout();
     VectorAppender vectorAppender = new VectorAppender();
     AsyncAppender asyncAppender = new AsyncAppender();
     asyncAppender.setName("async-CloseTest");
@@ -65,7 +60,6 @@ public class AsyncAppenderTestCase exten
   // closed 
   public void test2() {
     Logger root = Logger.getRootLogger();
-    Layout layout = new SimpleLayout();
     VectorAppender vectorAppender = new VectorAppender();
     AsyncAppender asyncAppender = new AsyncAppender();
     asyncAppender.setName("async-test2");
@@ -86,7 +80,6 @@ public class AsyncAppenderTestCase exten
   public void test3() {
     int LEN = 200;
     Logger root = Logger.getRootLogger();
-    Layout layout = new SimpleLayout();
     VectorAppender vectorAppender = new VectorAppender();
     AsyncAppender asyncAppender = new AsyncAppender();
     asyncAppender.setName("async-test3");
@@ -274,10 +267,6 @@ public class AsyncAppenderTestCase exten
        */
       private final Object monitor = new Object();
 
-      /**
-       * Thread of last call to append.
-       */
-      private Thread dispatcher;
 
       /**
        * Create new instance.
@@ -291,7 +280,6 @@ public class AsyncAppenderTestCase exten
        */
       public void append(final LoggingEvent event) {
         synchronized (monitor) {
-          dispatcher = Thread.currentThread();
           super.append(event);
             //
             //   if fatal, echo messages for testLoggingInDispatcher
@@ -314,15 +302,6 @@ public class AsyncAppenderTestCase exten
         return monitor;
       }
 
-      /**
-       * Get thread of previous call to append.
-       * @return thread, may be null.
-       */
-      public Thread getDispatcher() {
-        synchronized (monitor) {
-          return dispatcher;
-        }
-      }
     }
 
 

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/DRFATestCase.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/DRFATestCase.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/DRFATestCase.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/DRFATestCase.java Mon Mar 22 03:37:08
2010
@@ -22,8 +22,6 @@ import junit.framework.TestCase;
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
-import java.io.FileWriter;
-import java.io.FileReader;
 import java.io.FileInputStream;
 import java.text.SimpleDateFormat;
 import java.util.Calendar;
@@ -64,8 +62,7 @@ public class DRFATestCase extends TestCa
     drfa.setDatePattern("yyyy-MM-dd.'log'");
     drfa.activateOptions();
 
-    int x = drfa.computeCheckPeriod();
-    int y = DailyRollingFileAppender.TOP_OF_DAY;
+    drfa.computeCheckPeriod();
     assertEquals(drfa.computeCheckPeriod(),
          DailyRollingFileAppender.TOP_OF_DAY);
 
@@ -143,7 +140,6 @@ public class DRFATestCase extends TestCa
     rc.setType(DailyRollingFileAppender.TOP_OF_HOUR);
 
     Calendar c = Calendar.getInstance();
-    TimeZone tz = c.getTimeZone();
 
     // jan, mar, may, july, aug, oct, dec have 31 days
     int [] M31 = {0,2,4,6,7,9,11};

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/EnhancedPatternLayoutTestCase.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/EnhancedPatternLayoutTestCase.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/EnhancedPatternLayoutTestCase.java
(original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/EnhancedPatternLayoutTestCase.java
Mon Mar 22 03:37:08 2010
@@ -36,8 +36,6 @@ import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.TimeZone;
 import java.io.*;
-import java.util.Properties;
-import java.util.regex.Pattern;
 
 
 public class EnhancedPatternLayoutTestCase extends TestCase {

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/FileAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/FileAppenderTest.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/FileAppenderTest.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/FileAppenderTest.java Mon Mar 22 03:37:08
2010
@@ -70,7 +70,6 @@ public class FileAppenderTest extends Te
   public void testgetSetThreshold() {
     FileAppender appender = new FileAppender();
     Priority debug = Level.DEBUG;
-    Priority all = Level.ALL;
     assertNull(appender.getThreshold());
     appender.setThreshold(debug);
     assertTrue(appender.getThreshold() == debug);

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/HTMLLayoutTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/HTMLLayoutTest.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/HTMLLayoutTest.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/HTMLLayoutTest.java Mon Mar 22 03:37:08
2010
@@ -86,7 +86,7 @@ public class HTMLLayoutTest extends Layo
 
     String src =
       "<!DOCTYPE body [ <!ENTITY nbsp ' '>]><body>" + result + "</body>";
-    Document doc = parse(src);
+    parse(src);
   }
 
   /**
@@ -181,6 +181,8 @@ public class HTMLLayoutTest extends Layo
      * Level with arbitrary toString value.
      */
     private static final class ProblemLevel extends Level {
+        private static final long serialVersionUID = 1L;
+
         /**
          * Construct new instance.
          * @param levelName level name, may not be null.

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/HierarchyThresholdTestCase.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/HierarchyThresholdTestCase.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/HierarchyThresholdTestCase.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/HierarchyThresholdTestCase.java Mon
Mar 22 03:37:08 2010
@@ -21,8 +21,7 @@ import junit.framework.TestCase;
 import junit.framework.TestSuite;
 import junit.framework.Test;
 
-import org.apache.log4j.*;
-import org.apache.log4j.util.*;
+import org.apache.log4j.util.Compare;
 import org.apache.log4j.xml.XLevel;
 
 /**

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/LevelTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/LevelTest.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/LevelTest.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/LevelTest.java Mon Mar 22 03:37:08
2010
@@ -89,6 +89,7 @@ public class LevelTest extends TestCase 
    * serializable, but not resolved to a plain Level.
    */
   private static class CustomLevel extends Level {
+    private static final long serialVersionUID = 1L;
       /**
        * Create an instance of CustomLevel.
        */

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/LoggerTestCase.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/LoggerTestCase.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/LoggerTestCase.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/LoggerTestCase.java Mon Mar 22 03:37:08
2010
@@ -174,7 +174,6 @@ public class LoggerTestCase extends Test
     Logger a = Logger.getLogger("a");
     Logger ab = Logger.getLogger("a.b");
     Logger abc = Logger.getLogger("a.b.c");
-    Logger x   = Logger.getLogger("x");
 
     CountingAppender caRoot = new CountingAppender();
     CountingAppender caA = new CountingAppender();

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/MinimumTestCase.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/MinimumTestCase.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/MinimumTestCase.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/MinimumTestCase.java Mon Mar 22 03:37:08
2010
@@ -21,7 +21,6 @@ import junit.framework.TestCase;
 import junit.framework.TestSuite;
 import junit.framework.Test;
 
-import org.apache.log4j.*;
 import org.apache.log4j.helpers.AbsoluteTimeDateFormat;
 import org.apache.log4j.util.*;
 

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/PropertyConfiguratorTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/PropertyConfiguratorTest.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/PropertyConfiguratorTest.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/PropertyConfiguratorTest.java Mon
Mar 22 03:37:08 2010
@@ -33,7 +33,6 @@ import org.apache.log4j.spi.LoggingEvent
 import org.apache.log4j.spi.ThrowableRenderer;
 import org.apache.log4j.spi.ThrowableRendererSupport;
 import org.apache.log4j.varia.LevelRangeFilter;
-import org.apache.log4j.helpers.OptionConverter;
 
 /**
  * Test property configurator.

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/VectorAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/VectorAppender.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/VectorAppender.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/VectorAppender.java Mon Mar 22 03:37:08
2010
@@ -18,11 +18,7 @@
 package org.apache.log4j;
 
 import java.util.Vector;
-import org.apache.log4j.Layout;
 import org.apache.log4j.spi.LoggingEvent;
-import org.apache.log4j.helpers.OptionConverter;
-import org.apache.log4j.helpers.Transform;
-import org.apache.log4j.helpers.LogLog;
 
 /**
    An appender that appends logging events to a vector.
@@ -52,7 +48,7 @@ public class VectorAppender extends Appe
     //System.out.println("---Vector appender called with message ["+event.getRenderedMessage()+"].");
     //System.out.flush();
     try {
-      Thread.currentThread().sleep(100);
+      Thread.sleep(100);
     } catch(Exception e) {
     }
     vector.addElement(event);

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/customLogger/XLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/customLogger/XLogger.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/customLogger/XLogger.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/customLogger/XLogger.java Mon Mar
22 03:37:08 2010
@@ -20,9 +20,7 @@ package org.apache.log4j.customLogger;
 
 import org.apache.log4j.*;
 import org.apache.log4j.spi.OptionHandler;
-import org.apache.log4j.spi.LoggingEvent;
 import org.apache.log4j.spi.LoggerFactory;
-import org.apache.log4j.helpers.LogLog;
 import org.apache.log4j.xml.XLevel;
 
 /**

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/customLogger/XLoggerTestCase.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/customLogger/XLoggerTestCase.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/customLogger/XLoggerTestCase.java
(original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/customLogger/XLoggerTestCase.java
Mon Mar 22 03:37:08 2010
@@ -18,9 +18,6 @@
 package org.apache.log4j.customLogger;
 
 import org.apache.log4j.xml.DOMConfigurator;
-import org.apache.log4j.Logger;
-import org.apache.log4j.Level;
-
 import org.apache.log4j.util.*;
 
 import junit.framework.TestCase;
@@ -52,7 +49,6 @@ public class XLoggerTestCase extends Tes
     DOMConfigurator.configure("input/xml/customLogger"+number+".xml");
 
     int i = -1;
-    Logger root = Logger.getRootLogger();
 
     logger.trace("Message " + ++i);
     logger.debug("Message " + ++i);

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/defaultInit/TestCase1.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/defaultInit/TestCase1.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/defaultInit/TestCase1.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/defaultInit/TestCase1.java Mon Mar
22 03:37:08 2010
@@ -20,10 +20,8 @@ package org.apache.log4j.defaultInit;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 import junit.framework.Test;
-
-import java.util.Vector;
-
-import org.apache.log4j.*;
+import org.apache.log4j.Logger;
+import org.apache.log4j.LogManager;
 
 public class TestCase1 extends TestCase {
 

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/defaultInit/TestCase2.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/defaultInit/TestCase2.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/defaultInit/TestCase2.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/defaultInit/TestCase2.java Mon Mar
22 03:37:08 2010
@@ -20,11 +20,10 @@ package org.apache.log4j.defaultInit;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 import junit.framework.Test;
-
-import java.util.Vector;
 import java.util.Enumeration;
-
-import org.apache.log4j.*;
+import org.apache.log4j.Appender;
+import org.apache.log4j.Logger;
+import org.apache.log4j.LogManager;
 
 public class TestCase2 extends TestCase {
 

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/defaultInit/TestCase3.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/defaultInit/TestCase3.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/defaultInit/TestCase3.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/defaultInit/TestCase3.java Mon Mar
22 03:37:08 2010
@@ -20,11 +20,10 @@ package org.apache.log4j.defaultInit;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 import junit.framework.Test;
-
-import java.util.Vector;
 import java.util.Enumeration;
-
-import org.apache.log4j.*;
+import org.apache.log4j.Appender;
+import org.apache.log4j.Logger;
+import org.apache.log4j.LogManager;
 
 public class TestCase3 extends TestCase {
 

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/defaultInit/TestCase4.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/defaultInit/TestCase4.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/defaultInit/TestCase4.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/defaultInit/TestCase4.java Mon Mar
22 03:37:08 2010
@@ -20,11 +20,10 @@ package org.apache.log4j.defaultInit;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 import junit.framework.Test;
-
-import java.util.Vector;
 import java.util.Enumeration;
-
-import org.apache.log4j.*;
+import org.apache.log4j.Appender;
+import org.apache.log4j.Logger;
+import org.apache.log4j.LogManager;
 
 public class TestCase4 extends TestCase {
 

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/BoundedFIFOTestCase.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/BoundedFIFOTestCase.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/BoundedFIFOTestCase.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/BoundedFIFOTestCase.java Mon
Mar 22 03:37:08 2010
@@ -28,11 +28,9 @@ import org.apache.log4j.spi.LoggingEvent
 import org.apache.log4j.Logger;
 import org.apache.log4j.Level;
 
-import org.apache.log4j.helpers.BoundedFIFO;
 
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
-import junit.framework.TestFailure;
 import junit.framework.Test;
 
 

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/CyclicBufferTestCase.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/CyclicBufferTestCase.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/CyclicBufferTestCase.java
(original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/CyclicBufferTestCase.java
Mon Mar 22 03:37:08 2010
@@ -27,11 +27,9 @@ package org.apache.log4j.helpers;
 import org.apache.log4j.spi.LoggingEvent;
 import org.apache.log4j.Logger;
 import org.apache.log4j.Level;
-import org.apache.log4j.helpers.CyclicBuffer;
 
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
-import junit.framework.TestFailure;
 import junit.framework.Test;
 
 /**

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/DateLayoutTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/DateLayoutTest.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/DateLayoutTest.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/DateLayoutTest.java Mon Mar
22 03:37:08 2010
@@ -25,7 +25,6 @@ import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 
 import java.util.TimeZone;
-import java.util.Date;
 import java.util.Calendar;
 
 

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/OptionConverterTestCase.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/OptionConverterTestCase.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/OptionConverterTestCase.java
(original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/OptionConverterTestCase.java
Mon Mar 22 03:37:08 2010
@@ -20,7 +20,6 @@
 
 package org.apache.log4j.helpers;
 
-import org.apache.log4j.helpers.OptionConverter;
 import org.apache.log4j.Level;
 import org.apache.log4j.xml.XLevel;
 
@@ -91,10 +90,9 @@ public class OptionConverterTestCase ext
 
   public
   void varSubstTest4() {
-    String res;
     String val = "Test4 ${incomplete ";
     try {
-      res = OptionConverter.substVars(val, null);
+      OptionConverter.substVars(val, null);
     }
     catch(IllegalArgumentException e) {
       String errorMsg = e.getMessage();

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/net/SocketAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/net/SocketAppenderTest.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/net/SocketAppenderTest.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/net/SocketAppenderTest.java Mon Mar
22 03:37:08 2010
@@ -17,8 +17,6 @@
 package org.apache.log4j.net;
 
 import junit.framework.TestCase;
-
-import org.apache.log4j.Appender;
 import org.apache.log4j.AppenderSkeleton;
 import org.apache.log4j.Logger;
 import org.apache.log4j.spi.LoggingEvent;
@@ -39,7 +37,6 @@ public class SocketAppenderTest extends 
         DOMConfigurator.configure("input/xml/SocketAppenderTestConfig.xml");
 
         logger = Logger.getLogger(SocketAppenderTest.class);
-        primary = logger.getAppender("remote");
         secondary = (LastOnlyAppender) Logger.getLogger(
                 "org.apache.log4j.net.SocketAppenderTestDummy").getAppender("lastOnly");
     }
@@ -60,7 +57,6 @@ public class SocketAppenderTest extends 
     /* Fields */
 
     private static Logger logger;
-    private static Appender primary;
     private static LastOnlyAppender secondary;
 
     /* Inner classes */

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/net/SocketServerTestCase.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/net/SocketServerTestCase.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/net/SocketServerTestCase.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/net/SocketServerTestCase.java Mon
Mar 22 03:37:08 2010
@@ -22,19 +22,12 @@ import junit.framework.TestSuite;
 import junit.framework.Test;
 
 import org.apache.log4j.*;
-import org.apache.log4j.helpers.AbsoluteTimeDateFormat;
 import org.apache.log4j.util.*;
 
-import org.apache.log4j.xml.DOMConfigurator;
-import org.apache.log4j.PropertyConfigurator;
 
 import org.apache.log4j.Logger;
-import org.apache.log4j.LogManager;
 import org.apache.log4j.NDC;
 import org.apache.log4j.xml.XLevel;
-import org.apache.log4j.Priority;
-import java.io.IOException;
-import java.util.Enumeration;
 
 /**
    @author  Ceki G&uuml;lc&uuml;
@@ -384,7 +377,7 @@ public class SocketServerTestCase extend
   }
 
   public void delay(int secs) {
-    try {Thread.currentThread().sleep(secs*1000);} catch(Exception e) {}
+    try {Thread.sleep(secs*1000);} catch(Exception e) {}
   }
 
 

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/net/SyslogAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/net/SyslogAppenderTest.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/net/SyslogAppenderTest.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/net/SyslogAppenderTest.java Mon Mar
22 03:37:08 2010
@@ -438,6 +438,7 @@ public class SyslogAppenderTest extends 
      * Exception with printStackTrace that breaks earlier SyslogAppender.
      */
     private static class MishandledException extends Exception {
+        private static final long serialVersionUID = 1L;
         /*
          *   Create new instance.
          */

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/or/ORTestCase.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/or/ORTestCase.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/or/ORTestCase.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/or/ORTestCase.java Mon Mar 22 03:37:08
2010
@@ -24,16 +24,10 @@
 
 package org.apache.log4j.or;
 
-import org.apache.log4j.spi.LoggingEvent;
-import org.apache.log4j.Category;
-import org.apache.log4j.Priority;
 
-import org.apache.log4j.or.ObjectRenderer;
-import org.apache.log4j.or.RendererMap;
 
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
-import junit.framework.TestFailure;
 import junit.framework.Test;
 
 import java.io.Serializable;
@@ -152,7 +146,7 @@ public class ORTestCase extends TestCase
     RendererMap map = new RendererMap();
     Class comparable = null; 
     try {
-        comparable = getClass().forName("java.lang.Comparable");
+        comparable = Class.forName("java.lang.Comparable");
     } catch(Exception ex) {
         //  likely JDK 1.1
         return;

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/pattern/CachedDateFormatTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/pattern/CachedDateFormatTest.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/pattern/CachedDateFormatTest.java
(original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/pattern/CachedDateFormatTest.java
Mon Mar 22 03:37:08 2010
@@ -51,21 +51,6 @@ public final class CachedDateFormatTest
       return df;
   }
 
-  /**
-   * Asserts that formatting the provided date results
-   * in the expected string.
-   *
-   * @param date Date date
-   * @param timeZone TimeZone timezone for conversion
-   * @param expected String expected string
-   */
-  private final void assertFormattedTime(Date date,
-                                         TimeZone timeZone,
-                                         String expected) {
-    DateFormat formatter = createAbsoluteTimeDateFormat(timeZone);
-    String actual = formatter.format(date);
-    assertEquals(expected, actual);
-  }
 
   /**
    * Timezone representing GMT.
@@ -149,8 +134,8 @@ public final class CachedDateFormatTest
     Date jul1 = new Date(ticks);
     assertEquals(baseFormat.format(jul1), cachedFormat.format(jul1));
     Date plus8ms = new Date(ticks + 8);
-    String base = baseFormat.format(plus8ms);
-    String cached = cachedFormat.format(plus8ms);
+    baseFormat.format(plus8ms);
+    cachedFormat.format(plus8ms);
     assertEquals(baseFormat.format(plus8ms), cachedFormat.format(plus8ms));
     Date plus17ms = new Date(ticks + 17);
     assertEquals(baseFormat.format(plus17ms), cachedFormat.format(plus17ms));

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/pattern/PatternParserTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/pattern/PatternParserTest.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/pattern/PatternParserTest.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/pattern/PatternParserTest.java Mon
Mar 22 03:37:08 2010
@@ -31,9 +31,7 @@ import junit.framework.TestCase;
 
 import org.apache.log4j.Layout;
 import org.apache.log4j.Level;
-import org.apache.log4j.LogManager;
 import org.apache.log4j.Logger;
-import org.apache.log4j.spi.LoggerRepository;
 import org.apache.log4j.spi.LoggingEvent;
 
 

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/spi/LoggingEventTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/spi/LoggingEventTest.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/spi/LoggingEventTest.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/spi/LoggingEventTest.java Mon Mar
22 03:37:08 2010
@@ -23,7 +23,6 @@ import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 import org.apache.log4j.MDC;
 import org.apache.log4j.NDC;
-import org.apache.log4j.spi.LocationInfo;
 import org.apache.log4j.util.SerializationTestHelper;
 import org.apache.log4j.Priority;
 import org.apache.log4j.Category;
@@ -91,7 +90,7 @@ public class LoggingEventTest extends Te
     LoggingEvent event =
       new LoggingEvent(
         root.getClass().getName(), root, Level.INFO, "Hello, world.", null);
-    LocationInfo info = event.getLocationInformation();
+    event.getLocationInformation();
 //    event.prepareForDeferredProcessing();
 
     int[] skip = new int[] { 352, 353, 354, 355, 356 };

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/spi/ThrowableInformationTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/spi/ThrowableInformationTest.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/spi/ThrowableInformationTest.java
(original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/spi/ThrowableInformationTest.java
Mon Mar 22 03:37:08 2010
@@ -39,6 +39,7 @@ public class ThrowableInformationTest ex
      * overridden by VectorWriter in log4j 1.2.14 and earlier.
      */
     private static final class OverriddenThrowable extends Throwable {
+        private static final long serialVersionUID = 1L;
         /**
          * Create new instance.
          */
@@ -82,6 +83,7 @@ public class ThrowableInformationTest ex
      * not overridden by VectorWriter in log4j 1.2.14 and earlier.
      */
     private static final class NotOverriddenThrowable extends Throwable {
+        private static final long serialVersionUID = 1L;
         /**
          * Create new instance.
          */
@@ -139,6 +141,7 @@ public class ThrowableInformationTest ex
      * with null.
      */
     private static final class NullThrowable extends Throwable {
+        private static final long serialVersionUID = 1L;
         /**
          * Create new instance.
          */
@@ -176,6 +179,7 @@ public class ThrowableInformationTest ex
      * Custom throwable that does nothing in printStackTrace.
      */
     private static final class EmptyThrowable extends Throwable {
+        private static final long serialVersionUID = 1L;
         /**
          * Create new instance.
          */
@@ -206,6 +210,7 @@ public class ThrowableInformationTest ex
      * Custom throwable that emits a specified string in printStackTrace.
      */
     private static final class StringThrowable extends Throwable {
+        private static final long serialVersionUID = 1L;
         /**
          * Stack trace.
          */
@@ -305,6 +310,7 @@ public class ThrowableInformationTest ex
      *    when printStackTrace is called.
      */
     private static final class NastyThrowable extends Throwable {
+        private static final long serialVersionUID = 1L;
         /**
          * Create new instance.
          */

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/util/AbsoluteDateAndTimeFilter.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/util/AbsoluteDateAndTimeFilter.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/util/AbsoluteDateAndTimeFilter.java
(original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/util/AbsoluteDateAndTimeFilter.java
Mon Mar 22 03:37:08 2010
@@ -17,7 +17,6 @@
 
 package org.apache.log4j.util;
 
-import java.io.*;
 
 import org.apache.oro.text.perl.Perl5Util;
 

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/util/AbsoluteTimeFilter.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/util/AbsoluteTimeFilter.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/util/AbsoluteTimeFilter.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/util/AbsoluteTimeFilter.java Mon Mar
22 03:37:08 2010
@@ -17,7 +17,6 @@
 
 package org.apache.log4j.util;
 
-import java.io.*;
 
 import org.apache.oro.text.perl.Perl5Util;
 

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/util/Transformer.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/util/Transformer.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/util/Transformer.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/util/Transformer.java Mon Mar 22 03:37:08
2010
@@ -18,7 +18,6 @@
 package org.apache.log4j.util;
 
 import java.io.BufferedReader;
-import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.FileReader;
 import java.io.IOException;

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/varia/ERFATestCase.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/varia/ERFATestCase.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/varia/ERFATestCase.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/varia/ERFATestCase.java Mon Mar 22
03:37:08 2010
@@ -27,7 +27,6 @@ import java.io.DataOutputStream;
 import java.io.File;
 import java.io.IOException;
 import java.net.Socket;
-import java.net.InetAddress;
 
 /**
  *  Test of ExternallyRolledFileAppender.

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/xml/DOMTestCase.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/xml/DOMTestCase.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/xml/DOMTestCase.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/xml/DOMTestCase.java Mon Mar 22 03:37:08
2010
@@ -24,7 +24,6 @@ import org.apache.log4j.Level;
 import org.apache.log4j.LogManager;
 import org.apache.log4j.Logger;
 import org.apache.log4j.VectorAppender;
-import org.apache.log4j.PropertyConfigurator;
 import org.apache.log4j.spi.ErrorHandler;
 import org.apache.log4j.spi.LoggerFactory;
 import org.apache.log4j.spi.LoggingEvent;
@@ -46,7 +45,6 @@ import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
-import java.util.Properties;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipOutputStream;
 

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/xml/XMLLayoutTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/xml/XMLLayoutTest.java?rev=925947&r1=925946&r2=925947&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/xml/XMLLayoutTest.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/xml/XMLLayoutTest.java Mon Mar 22
03:37:08 2010
@@ -358,6 +358,7 @@ public class XMLLayoutTest extends Layou
      * Level with arbitrary toString value.
      */
     private static final class ProblemLevel extends Level {
+        private static final long serialVersionUID = 1L;
         /**
          * Construct new instance.
          * @param levelName level name, may not be null.



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message