From: markt Date: Thu, 19 May 2011 12:45:49 +0000 (+0000) Subject: Remove unused isErrPage attribute X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=6ac5a544b64af907061f985d961684b1442478f3;p=tomcat7.0 Remove unused isErrPage attribute git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1124719 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/jasper/JspC.java b/java/org/apache/jasper/JspC.java index bf0886507..3d4c08cca 100644 --- a/java/org/apache/jasper/JspC.java +++ b/java/org/apache/jasper/JspC.java @@ -1160,7 +1160,7 @@ public class JspC implements Options { String jspUri=file.replace('\\','/'); JspCompilationContext clctxt = new JspCompilationContext - ( jspUri, false, this, context, null, rctxt ); + ( jspUri, this, context, null, rctxt ); /* Override the defaults */ if ((targetClassName != null) && (targetClassName.length() > 0)) { diff --git a/java/org/apache/jasper/JspCompilationContext.java b/java/org/apache/jasper/JspCompilationContext.java index 7558359ee..274db1059 100644 --- a/java/org/apache/jasper/JspCompilationContext.java +++ b/java/org/apache/jasper/JspCompilationContext.java @@ -63,7 +63,6 @@ public class JspCompilationContext { protected String className; protected String jspUri; - protected boolean isErrPage; protected String basePackageName; protected String derivedPackageName; protected String servletJavaFileName; @@ -95,14 +94,12 @@ public class JspCompilationContext { // jspURI _must_ be relative to the context public JspCompilationContext(String jspUri, - boolean isErrPage, Options options, ServletContext context, JspServletWrapper jsw, JspRuntimeContext rctxt) { this.jspUri = canonicalURI(jspUri); - this.isErrPage = isErrPage; this.options = options; this.jsw = jsw; this.context = context; @@ -132,7 +129,7 @@ public class JspCompilationContext { JspServletWrapper jsw, JspRuntimeContext rctxt, JarResource tagJarResource) { - this(tagfile, false, options, context, jsw, rctxt); + this(tagfile, options, context, jsw, rctxt); this.isTagFile = true; this.tagInfo = tagInfo; this.tagJarResource = tagJarResource; @@ -385,18 +382,6 @@ public class JspCompilationContext { return jspUri; } - /** - * Are we processing something that has been declared as an - * errorpage? - */ - public boolean isErrorPage() { - return isErrPage; - } - - public void setErrorPage(boolean isErrPage) { - this.isErrPage = isErrPage; - } - public boolean isTagFile() { return isTagFile; } diff --git a/java/org/apache/jasper/servlet/JspServlet.java b/java/org/apache/jasper/servlet/JspServlet.java index c72d11439..e6b451e5a 100644 --- a/java/org/apache/jasper/servlet/JspServlet.java +++ b/java/org/apache/jasper/servlet/JspServlet.java @@ -129,12 +129,12 @@ public class JspServlet extends HttpServlet implements PeriodicEventListener { AccessController.doPrivileged(new PrivilegedExceptionAction(){ @Override public Object run() throws IOException, ServletException { - serviceJspFile(null, null, jspFile, null, true); + serviceJspFile(null, null, jspFile, true); return null; } }); } else { - serviceJspFile(null, null, jspFile, null, true); + serviceJspFile(null, null, jspFile, true); } } catch (IOException e) { throw new ServletException("Could not precompile jsp: " + jspFile, e); @@ -330,7 +330,7 @@ public class JspServlet extends HttpServlet implements PeriodicEventListener { try { boolean precompile = preCompile(request); - serviceJspFile(request, response, jspUri, null, precompile); + serviceJspFile(request, response, jspUri, precompile); } catch (RuntimeException e) { throw e; } catch (ServletException e) { @@ -364,7 +364,7 @@ public class JspServlet extends HttpServlet implements PeriodicEventListener { private void serviceJspFile(HttpServletRequest request, HttpServletResponse response, String jspUri, - Throwable exception, boolean precompile) + boolean precompile) throws ServletException, IOException { JspServletWrapper wrapper = rctxt.getWrapper(jspUri); @@ -378,9 +378,8 @@ public class JspServlet extends HttpServlet implements PeriodicEventListener { handleMissingResource(request, response, jspUri); return; } - boolean isErrorPage = exception != null; wrapper = new JspServletWrapper(config, options, jspUri, - isErrorPage, rctxt); + rctxt); rctxt.addWrapper(jspUri,wrapper); } } diff --git a/java/org/apache/jasper/servlet/JspServletWrapper.java b/java/org/apache/jasper/servlet/JspServletWrapper.java index 5061c4083..a7d23bedb 100644 --- a/java/org/apache/jasper/servlet/JspServletWrapper.java +++ b/java/org/apache/jasper/servlet/JspServletWrapper.java @@ -97,8 +97,8 @@ public class JspServletWrapper { /* * JspServletWrapper for JSP pages. */ - public JspServletWrapper(ServletConfig config, Options options, String jspUri, - boolean isErrorPage, JspRuntimeContext rctxt) { + public JspServletWrapper(ServletConfig config, Options options, + String jspUri, JspRuntimeContext rctxt) { this.isTagFile = false; this.config = config; @@ -107,7 +107,7 @@ public class JspServletWrapper { unloadByCount = options.getMaxLoadedJsps() > 0 ? true : false; unloadByIdle = options.getJspIdleTimeout() > 0 ? true : false; unloadAllowed = unloadByCount || unloadByIdle ? true : false; - ctxt = new JspCompilationContext(jspUri, isErrorPage, options, + ctxt = new JspCompilationContext(jspUri, options, config.getServletContext(), this, rctxt); }