logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carn...@apache.org
Subject svn commit: r685308 - in /logging/log4j/trunk/src: changes/changes.xml main/java/org/apache/log4j/xml/DOMConfigurator.java
Date Tue, 12 Aug 2008 20:46:10 GMT
Author: carnold
Date: Tue Aug 12 13:46:09 2008
New Revision: 685308

URL: http://svn.apache.org/viewvc?rev=685308&view=rev
Log:
Bug 44899: Extra NPE error message when using missing appender class with DOMConfigurator

Modified:
    logging/log4j/trunk/src/changes/changes.xml
    logging/log4j/trunk/src/main/java/org/apache/log4j/xml/DOMConfigurator.java

Modified: logging/log4j/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/changes/changes.xml?rev=685308&r1=685307&r2=685308&view=diff
==============================================================================
--- logging/log4j/trunk/src/changes/changes.xml (original)
+++ logging/log4j/trunk/src/changes/changes.xml Tue Aug 12 13:46:09 2008
@@ -50,6 +50,7 @@
        <action action="fix" issue="25747">More explanations when hitting WARN No appenders
could be found for logger.</action>
        <action action="fix" issue="45039">Use Throwable.getStackTrace to obtain location
when running on JDK 1.4 or later.</action>
        <action action="fix" issue="44745">AsyncAppender fails on changing Throwable.</action>
+       <action action="fix" issue="44899">Extra NPE error message when using missing
appender class with DOMConfigurator.</action>
     </release>
   
     <release version="1.2.15" date="2007-08-24" description="SyslogAppender enhancements,
NTEventLogAppender and Maven build.">

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/xml/DOMConfigurator.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/xml/DOMConfigurator.java?rev=685308&r1=685307&r2=685308&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/xml/DOMConfigurator.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/xml/DOMConfigurator.java Tue Aug 12
13:46:09 2008
@@ -167,9 +167,11 @@
 	LogLog.error("No appender named ["+appenderName+"] could be found."); 
 	return null;
       } else {
-	appender = parseAppender(element);
-	appenderBag.put(appenderName, appender);
-	return appender;
+	      appender = parseAppender(element);
+          if (appender != null) {
+            appenderBag.put(appenderName, appender);
+          }
+    return appender;
       }
     } 
   }



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