logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject cvs commit: logging-log4j/tests/src/java/org/apache/log4j LoggerTestCase.java
Date Thu, 05 Aug 2004 19:25:51 GMT
yoavs       2004/08/05 12:25:51

  Modified:    src/java/org/apache/log4j Category.java
                        PropertyConfigurator.java
               src/java/org/apache/log4j/jmx LoggerDynamicMBean.java
               src/java/org/apache/log4j/lf5/viewer/categoryexplorer
                        CategoryNodeEditor.java
               src/java/org/apache/log4j/net SocketReceiver.java
               src/java/org/apache/log4j/or/jms MessageRenderer.java
               tests    build.xml
               tests/src/java/org/apache/log4j LoggerTestCase.java
  Log:
  Modified variables named "enum" to "enumeration" to avoid a JDK 1.5 compilation error (enum
is a reserved keyword in JDK 1.5).
  
  Undid the removal of PassByJNDI.java from the tests/build.xml compilation.  I committed
that by accident before.  I still don't like needing Jetty to build, though.
  
  Revision  Changes    Path
  1.86      +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.85
  retrieving revision 1.86
  diff -u -r1.85 -r1.86
  --- Category.java	5 Aug 2004 17:45:45 -0000	1.85
  +++ Category.java	5 Aug 2004 19:25:51 -0000	1.86
  @@ -236,11 +236,11 @@
      * @since 1.0
      */
     void closeNestedAppenders() {
  -    Enumeration enum = this.getAllAppenders();
  +    Enumeration enumeration = this.getAllAppenders();
   
  -    if (enum != null) {
  -      while (enum.hasMoreElements()) {
  -        Appender a = (Appender) enum.nextElement();
  +    if (enumeration != null) {
  +      while (enumeration.hasMoreElements()) {
  +        Appender a = (Appender) enumeration.nextElement();
   
           if (a instanceof AppenderAttachable) {
             a.close();
  
  
  
  1.66      +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.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- PropertyConfigurator.java	20 Apr 2004 17:19:51 -0000	1.65
  +++ PropertyConfigurator.java	5 Aug 2004 19:25:51 -0000	1.66
  @@ -506,10 +506,10 @@
     */
     protected void parseCatsAndRenderers(
       Properties props, LoggerRepository hierarchy) {
  -    Enumeration enum = props.propertyNames();
  +    Enumeration enumeration = props.propertyNames();
   
  -    while (enum.hasMoreElements()) {
  -      String key = (String) enum.nextElement();
  +    while (enumeration.hasMoreElements()) {
  +      String key = (String) enumeration.nextElement();
   
         if (key.startsWith(CATEGORY_PREFIX) || key.startsWith(LOGGER_PREFIX)) {
           String loggerName = null;
  
  
  
  1.4       +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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- LoggerDynamicMBean.java	18 Mar 2003 13:33:33 -0000	1.3
  +++ LoggerDynamicMBean.java	5 Aug 2004 19:25:51 -0000	1.4
  @@ -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);
       }
     }
  
  
  
  1.2       +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.2
  diff -u -r1.1 -r1.2
  --- CategoryNodeEditor.java	26 Apr 2002 15:48:43 -0000	1.1
  +++ CategoryNodeEditor.java	5 Aug 2004 19:25:51 -0000	1.2
  @@ -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);
  
  
  
  1.10      +2 -2      logging-log4j/src/java/org/apache/log4j/net/SocketReceiver.java
  
  Index: SocketReceiver.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/net/SocketReceiver.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- SocketReceiver.java	25 May 2004 04:45:22 -0000	1.9
  +++ SocketReceiver.java	5 Aug 2004 19:25:51 -0000	1.10
  @@ -273,8 +273,8 @@
     public Vector getConnectedSocketDetails() {
       Vector details = new Vector(socketList.size());
   
  -    for (Enumeration enum = socketList.elements(); enum.hasMoreElements();) {
  -      Socket socket = (Socket) enum.nextElement();
  +    for (Enumeration enumeration = socketList.elements(); enumeration.hasMoreElements();)
{
  +      Socket socket = (Socket) enumeration.nextElement();
         details.add(
           new SocketDetail(socket, (SocketNode) socketMap.get(socket)));
       }
  
  
  
  1.4       +0 -8      logging-log4j/src/java/org/apache/log4j/or/jms/MessageRenderer.java
  
  Index: MessageRenderer.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/or/jms/MessageRenderer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MessageRenderer.java	24 Apr 2002 01:16:12 -0000	1.3
  +++ MessageRenderer.java	5 Aug 2004 19:25:51 -0000	1.4
  @@ -71,14 +71,6 @@
   
   	sbuf.append(", Type=");
   	sbuf.append(m.getJMSType());
  -
  -	//Enumeration enum = m.getPropertyNames();
  -	//while(enum.hasMoreElements()) {
  -	//  String key = (String) enum.nextElement();
  -	//  sbuf.append("; "+key+"=");
  -	//  sbuf.append(m.getStringProperty(key));
  -	//}
  -
         } catch(JMSException e) {
   	LogLog.error("Could not parse Message.", e);
         }
  
  
  
  1.62      +1 -1      logging-log4j/tests/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/logging-log4j/tests/build.xml,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- build.xml	5 Aug 2004 17:45:45 -0000	1.61
  +++ build.xml	5 Aug 2004 19:25:51 -0000	1.62
  @@ -81,7 +81,7 @@
     <!-- ================================================================= -->
     <target name="build" depends="parentBuild, prepare">
       <javac srcdir="${tests.source.home}"
  -	   destdir="./classes" excludes="${stem}/chainsaw/receivers/*.java,**/PassByJNDI.java"
  +	   destdir="./classes" excludes="${stem}/chainsaw/receivers/*.java"
   	   deprecation="${deprecation}"
   	   debug="on">
         <classpath refid="tests.classpath"/>
  
  
  
  1.9       +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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- LoggerTestCase.java	5 Aug 2004 17:45:45 -0000	1.8
  +++ LoggerTestCase.java	5 Aug 2004 19:25:51 -0000	1.9
  @@ -75,8 +75,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);
     }
   
  @@ -95,10 +95,10 @@
       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