Author: markt
Date: Tue Jun 26 20:30:27 2012
New Revision: 1354211
URL: http://svn.apache.org/viewvc?rev=1354211&view=rev
Log:
Clean up
Modified:
tomcat/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java
tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java
Modified: tomcat/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java?rev=1354211&r1=1354210&r2=1354211&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java (original)
+++ tomcat/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java Tue Jun 26
20:30:27 2012
@@ -16,6 +16,7 @@
*/
package org.apache.jasper.runtime;
+import java.io.IOException;
import java.security.AccessController;
import java.security.PrivilegedAction;
@@ -29,7 +30,6 @@ import javax.servlet.jsp.JspFactory;
import javax.servlet.jsp.PageContext;
import org.apache.jasper.Constants;
-import org.apache.jasper.util.ExceptionUtils;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
@@ -94,32 +94,31 @@ public class JspFactoryImpl extends JspF
private PageContext internalGetPageContext(Servlet servlet, ServletRequest
request,
ServletResponse response, String errorPageURL, boolean
needsSession,
int bufferSize, boolean autoflush) {
- try {
- PageContext pc;
- if (USE_POOL) {
- PageContextPool pool = localPool.get();
- if (pool == null) {
- pool = new PageContextPool();
- localPool.set(pool);
- }
- pc = pool.get();
- if (pc == null) {
- pc = new PageContextImpl();
- }
- } else {
+
+ PageContext pc;
+ if (USE_POOL) {
+ PageContextPool pool = localPool.get();
+ if (pool == null) {
+ pool = new PageContextPool();
+ localPool.set(pool);
+ }
+ pc = pool.get();
+ if (pc == null) {
pc = new PageContextImpl();
}
+ } else {
+ pc = new PageContextImpl();
+ }
+
+ try {
pc.initialize(servlet, request, response, errorPageURL,
needsSession, bufferSize, autoflush);
- return pc;
- } catch (Throwable ex) {
- ExceptionUtils.handleThrowable(ex);
- if (ex instanceof RuntimeException) {
- throw (RuntimeException) ex;
- }
- log.fatal("Exception initializing page context", ex);
- return null;
+ } catch (IOException ioe) {
+ // Implementation never throws IOE but can't change the signature
+ // since it is part of the JSP API
}
+
+ return pc;
}
private void internalReleasePageContext(PageContext pc) {
Modified: tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java?rev=1354211&r1=1354210&r2=1354211&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java (original)
+++ tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java Tue Jun 26
20:30:27 2012
@@ -122,14 +122,6 @@ public class PageContextImpl extends Pag
boolean needsSession, int bufferSize, boolean autoFlush)
throws IOException {
- _initialize(servlet, request, response, errorPageURL, needsSession,
- bufferSize, autoFlush);
- }
-
- private void _initialize(Servlet servlet, ServletRequest request,
- ServletResponse response, String errorPageURL,
- boolean needsSession, int bufferSize, boolean autoFlush) {
-
// initialize state
this.servlet = servlet;
this.config = servlet.getServletConfig();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]