From: markt Date: Mon, 14 Dec 2009 10:37:01 +0000 (+0000) Subject: Test for null rather than waiting for the NPE ot be thrown. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=3d7c32af577f435bccc330c210f19896db79f7f6;p=tomcat7.0 Test for null rather than waiting for the NPE ot be thrown. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@890265 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/jasper/servlet/JspServletWrapper.java b/java/org/apache/jasper/servlet/JspServletWrapper.java index 7b0ee4a9b..b0267ec76 100644 --- a/java/org/apache/jasper/servlet/JspServletWrapper.java +++ b/java/org/apache/jasper/servlet/JspServletWrapper.java @@ -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 {