Author: markt Date: Wed Aug 27 09:05:21 2014 New Revision: 1620822 URL: http://svn.apache.org/r1620822 Log: Avoid NPE when using JspC
Modified: tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java?rev=1620822&r1=1620821&r2=1620822&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java Wed Aug 27 09:05:21 2014 @@ -255,10 +255,12 @@ public abstract class Compiler { // to be GC'd and save memory. ctxt.setWriter(null); - // Need to know if the JSP is an error page at runtime to determine - // which HTTP methods are permitted. Error pages permit any. Normal - // pages only permit GET, POST or HEAD. - jsw.setErrorPage(pageInfo.isErrorPage()); + if (jsw != null) { + // Need to know if the JSP is an error page at runtime to determine + // which HTTP methods are permitted. Error pages permit any. Normal + // pages only permit GET, POST or HEAD. + jsw.setErrorPage(pageInfo.isErrorPage()); + } if (log.isDebugEnabled()) { t4 = System.currentTimeMillis(); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org