Author: kkolinko
Date: Tue Jun 21 13:24:44 2011
New Revision: 1137996
URL: http://svn.apache.org/viewvc?rev=1137996&view=rev
Log:
Avoid NullPointerException in JULI FileHandler if formatter is misconfigured
Fixes https://issues.apache.org/bugzilla/post_bug.cgi
Modified:
tomcat/trunk/java/org/apache/juli/FileHandler.java
tomcat/trunk/webapps/docs/changelog.xml
Modified: tomcat/trunk/java/org/apache/juli/FileHandler.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/juli/FileHandler.java?rev=1137996&r1=1137995&r2=1137996&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/juli/FileHandler.java (original)
+++ tomcat/trunk/java/org/apache/juli/FileHandler.java Tue Jun 21 13:24:44 2011
@@ -327,7 +327,8 @@ public class FileHandler
try {
setFormatter((Formatter)
cl.loadClass(formatterName).newInstance());
} catch (Exception e) {
- // Ignore
+ // Ignore and fallback to defaults
+ setFormatter(new SimpleFormatter());
}
} else {
setFormatter(new SimpleFormatter());
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1137996&r1=1137995&r2=1137996&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Jun 21 13:24:44 2011
@@ -112,6 +112,10 @@
multiple occurrences of elements that are only allowed to appear once
in
web.xml and web-fragment.xml. (kfujino)
</fix>
+ <add>
+ <bug>51403</bug>: Avoid NPE in JULI FileHandler if formatter is
+ misconfigured. (kkolinko)
+ </add>
</changelog>
</subsection>
<subsection name="Coyote">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]