From 3d7c32af577f435bccc330c210f19896db79f7f6 Mon Sep 17 00:00:00 2001 From: markt Date: Mon, 14 Dec 2009 10:37:01 +0000 Subject: [PATCH] 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 --- java/org/apache/jasper/servlet/JspServletWrapper.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 { -- 2.11.0