Test for null rather than waiting for the NPE ot be thrown.
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 14 Dec 2009 10:37:01 +0000 (10:37 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 14 Dec 2009 10:37:01 +0000 (10:37 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@890265 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/jasper/servlet/JspServletWrapper.java

index 7b0ee4a..b0267ec 100644 (file)
@@ -476,9 +476,12 @@ public class JspServletWrapper {
                 }
             }
 
-            if (jspFrame == null) {
+            
+            if (jspFrame == null ||
+                    this.ctxt.getCompiler().getPageNodes() == null) {
                 // If we couldn't find a frame in the stack trace corresponding
-                // to the generated servlet class, we can't really add anything
+                // to the generated servlet class or we don't have a copy of the
+                // parsed JSP to hand, we can't really add anything
                 return new JasperException(ex);
             }
             else {