logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject cvs commit: logging-log4j/tests/src/java/org/apache/log4j LoggerTestCase.java
Date Fri, 29 Oct 2004 15:43:01 GMT
ceki        2004/10/29 08:43:01

  Modified:    .        Tag: v1_2-branch build.xml
               src/java/org/apache/log4j Tag: v1_2-branch Category.java
                        NDC.java PropertyConfigurator.java
               src/java/org/apache/log4j/chainsaw Tag: v1_2-branch
                        XMLFileHandler.java
               src/java/org/apache/log4j/config Tag: v1_2-branch
                        PropertyPrinter.java
               src/java/org/apache/log4j/jmx Tag: v1_2-branch
                        LoggerDynamicMBean.java
               src/java/org/apache/log4j/lf5/viewer/categoryexplorer Tag:
                        v1_2-branch CategoryNodeEditor.java
               src/java/org/apache/log4j/net/test Tag: v1_2-branch
                        SMTPMin.java
               src/java/org/apache/log4j/performance Tag: v1_2-branch
                        Logging.java NotLogging.java
               src/java/org/apache/log4j/spi Tag: v1_2-branch
                        LoggingEvent.java
               src/java/org/apache/log4j/test Tag: v1_2-branch
                        AsyncAppenderTest.java
                        ConfigurationFileParsing.java Finalize.java
                        PatternTest.java Shallow.java
                        ShortSocketServer.java
               tests/src/java/org/apache/log4j Tag: v1_2-branch
                        LoggerTestCase.java
  Log:
  NOTE: 1.2 BRANCH COMMIT
  
  - Removed references for the 'enum' keyword in prevision of JDK 1.5
  
  - Replaced deprecated method calls with their replacement. This leads
    to a compile with far fewer deprecation warnings while the logic remains
    the same.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.34.2.11 +3 -0      logging-log4j/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/logging-log4j/build.xml,v
  retrieving revision 1.34.2.10
  retrieving revision 1.34.2.11
  diff -u -r1.34.2.10 -r1.34.2.11
  --- build.xml	18 Feb 2003 16:50:11 -0000	1.34.2.10
  +++ build.xml	29 Oct 2004 15:42:59 -0000	1.34.2.11
  @@ -22,6 +22,9 @@
     <!-- The base directory relative to which most targets are built -->
     <property name="base" value="."/>
   
  +
  +  <property name="deprecation" value="on"/>
  +
     <!-- The directory where source files are stored. -->
     <property name="java.source.dir" value="src/java/"/>
   
  
  
  
  No                   revision
  No                   revision
  1.68.2.3  +4 -4      logging-log4j/src/java/org/apache/log4j/Category.java
  
  Index: Category.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/Category.java,v
  retrieving revision 1.68.2.2
  retrieving revision 1.68.2.3
  diff -u -r1.68.2.2 -r1.68.2.3
  --- Category.java	25 Jun 2002 23:23:51 -0000	1.68.2.2
  +++ Category.java	29 Oct 2004 15:42:59 -0000	1.68.2.3
  @@ -204,10 +204,10 @@
     */
     synchronized
     void closeNestedAppenders() {
  -    Enumeration enum = this.getAllAppenders();
  -    if(enum != null) {
  -      while(enum.hasMoreElements()) {
  -	Appender a = (Appender) enum.nextElement();
  +    Enumeration enumeration = this.getAllAppenders();
  +    if(enumeration != null) {
  +      while(enumeration.hasMoreElements()) {
  +	Appender a = (Appender) enumeration.nextElement();
   	if(a instanceof AppenderAttachable) {
   	  a.close();
   	}
  
  
  
  1.13.2.2  +3 -3      logging-log4j/src/java/org/apache/log4j/NDC.java
  
  Index: NDC.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/NDC.java,v
  retrieving revision 1.13.2.1
  retrieving revision 1.13.2.2
  diff -u -r1.13.2.1 -r1.13.2.2
  --- NDC.java	17 May 2002 11:54:06 -0000	1.13.2.1
  +++ NDC.java	29 Oct 2004 15:42:59 -0000	1.13.2.2
  @@ -240,13 +240,13 @@
   
         int misses = 0;
         v = new Vector(); 
  -      Enumeration enum = ht.keys();
  +      Enumeration enumeration = ht.keys();
         // We give up after 4 straigt missses. That is 4 consecutive
         // inspected threads in 'ht' that turn out to be alive.
         // The higher the proportion on dead threads in ht, the higher the
         // chances of removal.
  -      while(enum.hasMoreElements() && (misses <= 4)) {
  -	Thread t = (Thread) enum.nextElement();
  +      while(enumeration.hasMoreElements() && (misses <= 4)) {
  +	Thread t = (Thread) enumeration.nextElement();
   	if(t.isAlive()) {
   	  misses++;
   	} else {
  
  
  
  1.54.2.5  +3 -3      logging-log4j/src/java/org/apache/log4j/PropertyConfigurator.java
  
  Index: PropertyConfigurator.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/PropertyConfigurator.java,v
  retrieving revision 1.54.2.4
  retrieving revision 1.54.2.5
  diff -u -r1.54.2.4 -r1.54.2.5
  --- PropertyConfigurator.java	9 Oct 2002 20:38:25 -0000	1.54.2.4
  +++ PropertyConfigurator.java	29 Oct 2004 15:42:59 -0000	1.54.2.5
  @@ -508,9 +508,9 @@
     */
     protected
     void parseCatsAndRenderers(Properties props, LoggerRepository hierarchy) {
  -    Enumeration enum = props.propertyNames();
  -    while(enum.hasMoreElements()) {
  -      String key = (String) enum.nextElement();
  +    Enumeration enumeration = props.propertyNames();
  +    while(enumeration.hasMoreElements()) {
  +      String key = (String) enumeration.nextElement();
         if(key.startsWith(CATEGORY_PREFIX) || key.startsWith(LOGGER_PREFIX)) {
   	String loggerName = null;
   	if(key.startsWith(CATEGORY_PREFIX)) {
  
  
  
  No                   revision
  No                   revision
  1.2.2.2   +5 -5      logging-log4j/src/java/org/apache/log4j/chainsaw/Attic/XMLFileHandler.java
  
  Index: XMLFileHandler.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/chainsaw/Attic/XMLFileHandler.java,v
  retrieving revision 1.2.2.1
  retrieving revision 1.2.2.2
  diff -u -r1.2.2.1 -r1.2.2.2
  --- XMLFileHandler.java	29 May 2002 11:54:24 -0000	1.2.2.1
  +++ XMLFileHandler.java	29 Oct 2004 15:43:00 -0000	1.2.2.2
  @@ -7,7 +7,7 @@
   package org.apache.log4j.chainsaw;
   
   import java.util.StringTokenizer;
  -import org.apache.log4j.Priority;
  +import org.apache.log4j.Level;
   import org.xml.sax.Attributes;
   import org.xml.sax.SAXException;
   import org.xml.sax.helpers.DefaultHandler;
  @@ -41,7 +41,7 @@
       /** the time of the event **/
       private long mTimeStamp;
       /** the priority (level) of the event **/
  -    private Priority mPriority;
  +    private Level mLevel;
       /** the category of the event **/
       private String mCategoryName;
       /** the NDC for the event **/
  @@ -115,7 +115,7 @@
               mThreadName = aAtts.getValue("thread");
               mTimeStamp = Long.parseLong(aAtts.getValue("timestamp"));
               mCategoryName = aAtts.getValue("logger");
  -            mPriority = Priority.toPriority(aAtts.getValue("level"));
  +            mLevel = Level.toLevel(aAtts.getValue("level"));
           } else if (TAG_LOCATION_INFO.equals(aQName)) {
               mLocationDetails = aAtts.getValue("class") + "."
                   + aAtts.getValue("method")
  @@ -136,7 +136,7 @@
       /** Add an event to the model **/
       private void addEvent() {
           mModel.addEvent(new EventDetails(mTimeStamp,
  -                                         mPriority,
  +                                         mLevel,
                                            mCategoryName,
                                            mNDC,
                                            mThreadName,
  @@ -149,7 +149,7 @@
       /** Reset the data for an event **/
       private void resetData() {
           mTimeStamp = 0;
  -        mPriority = null;
  +        mLevel = null;
           mCategoryName = null;
           mNDC = null;
           mThreadName = null;
  
  
  
  No                   revision
  No                   revision
  1.2.2.2   +1 -1      logging-log4j/src/java/org/apache/log4j/config/PropertyPrinter.java
  
  Index: PropertyPrinter.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/config/PropertyPrinter.java,v
  retrieving revision 1.2.2.1
  retrieving revision 1.2.2.2
  diff -u -r1.2.2.1 -r1.2.2.2
  --- PropertyPrinter.java	12 Jun 2002 13:55:32 -0000	1.2.2.1
  +++ PropertyPrinter.java	29 Oct 2004 15:43:00 -0000	1.2.2.2
  @@ -69,7 +69,7 @@
     void print(PrintWriter out) {
       printOptions(out, Category.getRoot());
       
  -    Enumeration cats = Category.getCurrentCategories();
  +    Enumeration cats = LogManager.getCurrentLoggers();
       while (cats.hasMoreElements()) {
         printOptions(out, (Category) cats.nextElement());
       }
  
  
  
  No                   revision
  No                   revision
  1.2.2.1   +3 -3      logging-log4j/src/java/org/apache/log4j/jmx/LoggerDynamicMBean.java
  
  Index: LoggerDynamicMBean.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/jmx/LoggerDynamicMBean.java,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- LoggerDynamicMBean.java	24 Apr 2002 01:16:13 -0000	1.2
  +++ LoggerDynamicMBean.java	29 Oct 2004 15:43:00 -0000	1.2.2.1
  @@ -228,9 +228,9 @@
     }
   
     void appenderMBeanRegistration() {
  -    Enumeration enum = logger.getAllAppenders();
  -    while(enum.hasMoreElements()) {
  -      Appender appender = (Appender) enum.nextElement();
  +    Enumeration enumeration = logger.getAllAppenders();
  +    while(enumeration.hasMoreElements()) {
  +      Appender appender = (Appender) enumeration.nextElement();
         registerAppenderMBean(appender);
       }
     }
  
  
  
  No                   revision
  No                   revision
  1.1.2.1   +3 -3      logging-log4j/src/java/org/apache/log4j/lf5/viewer/categoryexplorer/CategoryNodeEditor.java
  
  Index: CategoryNodeEditor.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/lf5/viewer/categoryexplorer/CategoryNodeEditor.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- CategoryNodeEditor.java	26 Apr 2002 15:48:43 -0000	1.1
  +++ CategoryNodeEditor.java	29 Oct 2004 15:43:00 -0000	1.1.2.1
  @@ -241,9 +241,9 @@
     protected int removeUnusedNodes() {
       int count = 0;
       CategoryNode root = _categoryModel.getRootCategoryNode();
  -    Enumeration enum = root.depthFirstEnumeration();
  -    while (enum.hasMoreElements()) {
  -      CategoryNode node = (CategoryNode) enum.nextElement();
  +    Enumeration enumeration = root.depthFirstEnumeration();
  +    while (enumeration.hasMoreElements()) {
  +      CategoryNode node = (CategoryNode) enumeration.nextElement();
         if (node.isLeaf() && node.getNumberOfContainedRecords() == 0
             && node.getParent() != null) {
           _categoryModel.removeNodeFromParent(node);
  
  
  
  No                   revision
  No                   revision
  1.4.2.2   +1 -1      logging-log4j/src/java/org/apache/log4j/net/test/SMTPMin.java
  
  Index: SMTPMin.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/net/test/SMTPMin.java,v
  retrieving revision 1.4.2.1
  retrieving revision 1.4.2.2
  diff -u -r1.4.2.1 -r1.4.2.2
  --- SMTPMin.java	12 Jun 2002 13:55:33 -0000	1.4.2.1
  +++ SMTPMin.java	29 Oct 2004 15:43:00 -0000	1.4.2.2
  @@ -48,7 +48,7 @@
       cat.warn( "Message " + i++);
       cat.error( "Message " + i++);
       cat.log(Priority.FATAL, "Message " + i++);
  -    Category.shutdown();
  +    LogManager.shutdown();
       Thread.currentThread().getThreadGroup().list();
     }
   
  
  
  
  No                   revision
  No                   revision
  1.11.2.1  +2 -1      logging-log4j/src/java/org/apache/log4j/performance/Attic/Logging.java
  
  Index: Logging.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/performance/Attic/Logging.java,v
  retrieving revision 1.11
  retrieving revision 1.11.2.1
  diff -u -r1.11 -r1.11.2.1
  --- Logging.java	24 Apr 2002 01:16:11 -0000	1.11
  +++ Logging.java	29 Oct 2004 15:43:00 -0000	1.11.2.1
  @@ -7,6 +7,7 @@
   
   package org.apache.log4j.performance;
   
  +import org.apache.log4j.LogManager;
   import org.apache.log4j.Category;
   import org.apache.log4j.xml.DOMConfigurator;
   
  @@ -232,7 +233,7 @@
   
       System.out.print((int)delta);
   
  -    Category.shutdown();
  +    LogManager.shutdown();
   
     }
   
  
  
  
  1.10.2.1  +2 -1      logging-log4j/src/java/org/apache/log4j/performance/Attic/NotLogging.java
  
  Index: NotLogging.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/performance/Attic/NotLogging.java,v
  retrieving revision 1.10
  retrieving revision 1.10.2.1
  diff -u -r1.10 -r1.10.2.1
  --- NotLogging.java	24 Apr 2002 01:16:11 -0000	1.10
  +++ NotLogging.java	29 Oct 2004 15:43:00 -0000	1.10.2.1
  @@ -5,6 +5,7 @@
   
   
   import org.apache.log4j.Category;
  +import org.apache.log4j.LogManager;
   import org.apache.log4j.SimpleLayout;
   import org.apache.log4j.ConsoleAppender;
   
  @@ -126,7 +127,7 @@
         // nothing to do
       } else if ("true".equals(args[0])) {
         System.out.println("Flagging as shipped code.");
  -      Category.getDefaultHierarchy().setThreshold((Level) Level.WARN);
  +      LogManager.getLoggerRepository().setThreshold((Level) Level.WARN);
       } else
         Usage();
   
  
  
  
  No                   revision
  No                   revision
  1.31.2.5  +1 -1      logging-log4j/src/java/org/apache/log4j/spi/LoggingEvent.java
  
  Index: LoggingEvent.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/spi/LoggingEvent.java,v
  retrieving revision 1.31.2.4
  retrieving revision 1.31.2.5
  diff -u -r1.31.2.4 -r1.31.2.5
  --- LoggingEvent.java	31 Jul 2002 09:25:14 -0000	1.31.2.4
  +++ LoggingEvent.java	29 Oct 2004 15:43:00 -0000	1.31.2.5
  @@ -281,7 +281,7 @@
          if(message instanceof String)
   	 renderedMessage = (String) message;
          else {
  -	 LoggerRepository repository = logger.getHierarchy();
  +	 LoggerRepository repository = logger.getLoggerRepository();
   
   	 if(repository instanceof RendererSupport) {
   	   RendererSupport rs = (RendererSupport) repository;
  
  
  
  No                   revision
  No                   revision
  1.1.2.2   +2 -1      logging-log4j/src/java/org/apache/log4j/test/Attic/AsyncAppenderTest.java
  
  Index: AsyncAppenderTest.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/test/Attic/AsyncAppenderTest.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- AsyncAppenderTest.java	12 Jun 2002 13:55:34 -0000	1.1.2.1
  +++ AsyncAppenderTest.java	29 Oct 2004 15:43:00 -0000	1.1.2.2
  @@ -7,6 +7,7 @@
   package org.apache.log4j.test;
   
   import org.apache.log4j.Category;
  +import org.apache.log4j.LogManager;
   import org.apache.log4j.xml.DOMConfigurator;
   
   /**
  @@ -59,7 +60,7 @@
       }
   
       try{Thread.currentThread().sleep(delayBeforeClose);}catch(Exception e){}
  -    Category.shutdown();
  +    LogManager.shutdown();
     }
   
     
  
  
  
  1.4.2.2   +2 -1      logging-log4j/src/java/org/apache/log4j/test/Attic/ConfigurationFileParsing.java
  
  Index: ConfigurationFileParsing.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/test/Attic/ConfigurationFileParsing.java,v
  retrieving revision 1.4.2.1
  retrieving revision 1.4.2.2
  diff -u -r1.4.2.1 -r1.4.2.2
  --- ConfigurationFileParsing.java	12 Jun 2002 13:55:34 -0000	1.4.2.1
  +++ ConfigurationFileParsing.java	29 Oct 2004 15:43:00 -0000	1.4.2.2
  @@ -9,6 +9,7 @@
   
   import org.apache.log4j.PropertyConfigurator;
   import org.apache.log4j.Category;
  +import org.apache.log4j.LogManager;
   import org.apache.log4j.NDC;
   
   public class ConfigurationFileParsing {
  @@ -24,7 +25,7 @@
         root.debug("Message 1");
         root.debug("Message 2");      
         NDC.pop();
  -      Category.shutdown();
  +      LogManager.shutdown();
       }
       else {
         Usage("Wrong number of arguments.");
  
  
  
  1.3.2.1   +3 -3      logging-log4j/src/java/org/apache/log4j/test/Attic/Finalize.java
  
  Index: Finalize.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/test/Attic/Finalize.java,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- Finalize.java	24 Apr 2002 01:16:11 -0000	1.3
  +++ Finalize.java	29 Oct 2004 15:43:00 -0000	1.3.2.1
  @@ -69,9 +69,9 @@
   
     static
     void foo(Category cat) {
  -    Enumeration enum = cat.getAllAppenders();
  -    while(enum != null && enum.hasMoreElements()) {
  -      ((org.apache.log4j.Appender) enum.nextElement()).close();
  +    Enumeration enumaration = cat.getAllAppenders();
  +    while(enumaration != null && enumaration.hasMoreElements()) {
  +      ((org.apache.log4j.Appender) enumaration.nextElement()).close();
       }
     }
   
  
  
  
  1.4.2.1   +2 -1      logging-log4j/src/java/org/apache/log4j/test/Attic/PatternTest.java
  
  Index: PatternTest.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/test/Attic/PatternTest.java,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- PatternTest.java	13 Feb 2001 17:37:31 -0000	1.4
  +++ PatternTest.java	29 Oct 2004 15:43:00 -0000	1.4.2.1
  @@ -3,6 +3,7 @@
   
   import org.apache.log4j.PropertyConfigurator;
   import org.apache.log4j.Category;
  +import org.apache.log4j.LogManager;
   import org.apache.log4j.Priority;
   /**
      This class is a test of the PatternLayout class.
  @@ -73,6 +74,6 @@
       CAT.log(Priority.FATAL, "Message " + ++i, e);
       root.log(Priority.FATAL, "Message " + i, e);    
       
  -    Category.shutdown();
  +    LogManager.shutdown();
     }
   }
  
  
  
  1.8.2.1   +9 -7      logging-log4j/src/java/org/apache/log4j/test/Attic/Shallow.java
  
  Index: Shallow.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/test/Attic/Shallow.java,v
  retrieving revision 1.8
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- Shallow.java	24 Apr 2002 01:16:11 -0000	1.8
  +++ Shallow.java	29 Oct 2004 15:43:00 -0000	1.8.2.1
  @@ -9,8 +9,10 @@
   import org.apache.log4j.PropertyConfigurator;
   import org.apache.log4j.xml.DOMConfigurator;
   import org.apache.log4j.Category;
  +import org.apache.log4j.Logger;
  +import org.apache.log4j.LogManager;
   import org.apache.log4j.NDC;
  -import org.apache.log4j.Priority;
  +import org.apache.log4j.Level;
   /**
      This class is a shallow test of the various appenders and
      layouts. It also tests their reading of the configuration file.
  @@ -62,8 +64,8 @@
       cat.error("Message " + ++i);
       root.error("Message " + i);
   
  -    cat.log(Priority.FATAL, "Message " + ++i);
  -    root.log(Priority.FATAL, "Message " + i);
  +    cat.log(Level.FATAL, "Message " + ++i);
  +    root.log(Level.FATAL, "Message " + i);
   
       Exception e = new Exception("Just testing");
       cat.debug("Message " + ++i, e);
  @@ -78,14 +80,14 @@
       cat.error("Message " + ++i, e);
       root.error("Message " + i, e);
   
  -    cat.log(Priority.FATAL, "Message " + ++i, e);
  -    root.log(Priority.FATAL, "Message " + i, e);
  +    cat.log(Level.FATAL, "Message " + ++i, e);
  +    root.log(Level.FATAL, "Message " + i, e);
   
  -    root.setPriority(Priority.FATAL);
  +    root.setLevel(Level.FATAL);
   
       // It is always a good idea to call this method when exiting an
       // application.
  -    Category.shutdown();
  +    LogManager.shutdown();
     }
   
   
  
  
  
  1.8.2.1   +2 -1      logging-log4j/src/java/org/apache/log4j/test/Attic/ShortSocketServer.java
  
  Index: ShortSocketServer.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/test/Attic/ShortSocketServer.java,v
  retrieving revision 1.8
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- ShortSocketServer.java	24 Apr 2002 01:16:11 -0000	1.8
  +++ ShortSocketServer.java	29 Oct 2004 15:43:00 -0000	1.8.2.1
  @@ -6,6 +6,7 @@
   import java.net.ServerSocket;
   
   import org.apache.log4j.Category;
  +import org.apache.log4j.LogManager;
   import org.apache.log4j.PropertyConfigurator;
   import org.apache.log4j.helpers.LogLog;
   import org.apache.log4j.net.SocketNode;
  @@ -35,7 +36,7 @@
         Socket socket = serverSocket.accept();
         LogLog.debug("Connected to client at " + socket.getInetAddress());
         LogLog.debug("Starting new socket node.");
  -      SocketNode sn = new SocketNode(socket, Category.getDefaultHierarchy());
  +      SocketNode sn = new SocketNode(socket, LogManager.getLoggerRepository());
         Thread t = new Thread(sn);
         t.start();
         t.join();
  
  
  
  No                   revision
  No                   revision
  1.4.2.1   +5 -5      logging-log4j/tests/src/java/org/apache/log4j/LoggerTestCase.java
  
  Index: LoggerTestCase.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/tests/src/java/org/apache/log4j/LoggerTestCase.java,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- LoggerTestCase.java	25 Apr 2002 14:09:01 -0000	1.4
  +++ LoggerTestCase.java	29 Oct 2004 15:43:01 -0000	1.4.2.1
  @@ -73,8 +73,8 @@
       a1.setName("testAppender1");             
       logger.addAppender(a1);
   
  -    Enumeration enum = logger.getAllAppenders();
  -    Appender aHat = (Appender) enum.nextElement();    
  +    Enumeration enumeration = logger.getAllAppenders();
  +    Appender aHat = (Appender) enumeration.nextElement();    
       assertEquals(a1, aHat);    
     }
   
  @@ -93,10 +93,10 @@
       logger.addAppender(a1);
       logger.addAppender(a2);    
       logger.removeAppender("testAppender2.1");
  -    Enumeration enum = logger.getAllAppenders();
  -    Appender aHat = (Appender) enum.nextElement();    
  +    Enumeration enumeration = logger.getAllAppenders();
  +    Appender aHat = (Appender) enumeration.nextElement();    
       assertEquals(a2, aHat);
  -    assertTrue(!enum.hasMoreElements());
  +    assertTrue(!enumeration.hasMoreElements());
     }
   
     /**
  
  
  

---------------------------------------------------------------------
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