tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r896622 - /tomcat/trunk/java/org/apache/jasper/compiler/JspConfig.java
Date Wed, 06 Jan 2010 19:04:33 GMT
Author: markt
Date: Wed Jan  6 19:04:32 2010
New Revision: 896622

URL: http://svn.apache.org/viewvc?rev=896622&view=rev
Log:
Prevent NPE in emebedded case when no web.xml is provided at all

Modified:
    tomcat/trunk/java/org/apache/jasper/compiler/JspConfig.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspConfig.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspConfig.java?rev=896622&r1=896621&r2=896622&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/JspConfig.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/JspConfig.java Wed Jan  6 19:04:32 2010
@@ -77,9 +77,12 @@
         try {
             webXml = new WebXml(ctxt);
             
-            ParserUtils pu = new ParserUtils();
-            TreeNode webApp = pu.parseXMLDocument(webXml.getSystemId(),
-                    webXml.getInputSource());
+            TreeNode webApp = null;
+            if (webXml.getInputSource() != null) {
+                ParserUtils pu = new ParserUtils();
+                webApp = pu.parseXMLDocument(webXml.getSystemId(),
+                        webXml.getInputSource());
+            }
 
             if (webApp == null
                     || getVersion(webApp) < 2.4) {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message