Author: markt
Date: Tue Jun 26 20:06:21 2012
New Revision: 1354200

URL: http://svn.apache.org/viewvc?rev=1354200&view=rev
Log:
Simplify.

Modified:
    tomcat/trunk/java/javax/servlet/jsp/PageContext.java
    tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java
    tomcat/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java
    tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java

Modified: tomcat/trunk/java/javax/servlet/jsp/PageContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/jsp/PageContext.java?rev=1354200&r1=1354199&r2=1354200&view=diff
==============================================================================
--- tomcat/trunk/java/javax/servlet/jsp/PageContext.java (original)
+++ tomcat/trunk/java/javax/servlet/jsp/PageContext.java Tue Jun 26 20:06:21 
2012
@@ -216,7 +216,6 @@ public abstract class PageContext
      * @param autoFlush The value of the autoflush attribute from the page
      *     directive
      *
-     * @throws IOException during creation of JspWriter
      * @throws IllegalStateException if out not correctly initialized
      * @throws IllegalArgumentException If one of the given parameters
      *     is invalid
@@ -225,7 +224,7 @@ public abstract class PageContext
     public abstract void initialize(Servlet servlet, ServletRequest request,
         ServletResponse response, String errorPageURL, boolean needsSession,
         int bufferSize, boolean autoFlush)
-        throws IOException, IllegalStateException, IllegalArgumentException;
+        throws IllegalStateException, IllegalArgumentException;
 
     /**
      * <p>

Modified: tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java?rev=1354200&r1=1354199&r2=1354200&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java 
(original)
+++ tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java Tue Jun 
26 20:06:21 2012
@@ -97,7 +97,7 @@ public class JspContextWrapper extends P
     public void initialize(Servlet servlet, ServletRequest request,
             ServletResponse response, String errorPageURL,
             boolean needsSession, int bufferSize, boolean autoFlush)
-            throws IOException, IllegalStateException, 
IllegalArgumentException {
+            throws IllegalStateException, IllegalArgumentException {
     }
 
     @Override

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=1354200&r1=1354199&r2=1354200&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:06:21 2012
@@ -29,7 +29,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 +93,24 @@ 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 {
-                pc = new PageContextImpl();
+
+        PageContext pc;
+        if (USE_POOL) {
+            PageContextPool pool = localPool.get();
+            if (pool == null) {
+                pool = new PageContextPool();
+                localPool.set(pool);
             }
-            pc.initialize(servlet, request, response, errorPageURL,
-                    needsSession, bufferSize, autoflush);
-            return pc;
-        } catch (Throwable ex) {
-            ExceptionUtils.handleThrowable(ex);
-            if (ex instanceof RuntimeException) {
-                throw (RuntimeException) ex;
+            pc = pool.get();
+            if (pc == null) {
+                pc = new PageContextImpl();
             }
-            log.fatal("Exception initializing page context", ex);
-            return null;
+        } else {
+            pc = new PageContextImpl();
         }
+        pc.initialize(servlet, request, response, errorPageURL,
+                needsSession, bufferSize, autoflush);
+        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=1354200&r1=1354199&r2=1354200&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:06:21 2012
@@ -119,15 +119,6 @@ public class PageContextImpl extends Pag
     @Override
     public void initialize(Servlet servlet, ServletRequest request,
             ServletResponse response, String errorPageURL,
-            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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to