ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r669848 - /ant/core/trunk/src/main/org/apache/tools/ant/listener/Log4jListener.java
Date Fri, 20 Jun 2008 10:37:44 GMT
Author: bodewig
Date: Fri Jun 20 03:37:44 2008
New Revision: 669848

URL: http://svn.apache.org/viewvc?rev=669848&view=rev
Log:
assign final variable initialized only once

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/listener/Log4jListener.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/listener/Log4jListener.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/listener/Log4jListener.java?rev=669848&r1=669847&r2=669848&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/listener/Log4jListener.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/listener/Log4jListener.java Fri Jun 20 03:37:44
2008
@@ -45,12 +45,10 @@
      * Construct the listener and make sure there is a valid appender.
      */
     public Log4jListener() {
-        initialized = false;
         Logger log = Logger.getLogger(LOG_ANT);
         Logger rootLog = Logger.getRootLogger();
-        if (!(rootLog.getAllAppenders() instanceof NullEnumeration)) {
-            initialized = true;
-        } else {
+        initialized = !(rootLog.getAllAppenders() instanceof NullEnumeration);
+        if (!initialized) {
             log.error("No log4j.properties in build area");
         }
     }



Mime
View raw message