Author: remm
Date: Fri Feb  9 17:53:06 2007
New Revision: 505610

URL: http://svn.apache.org/viewvc?view=rev&rev=505610
Log:
- Indent (sorry, the class was too hard to work with).

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java?view=diff&rev=505610&r1=505609&r2=505610
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java Fri 
Feb  9 17:53:06 2007
@@ -46,56 +46,50 @@
     private static final String SPEC_VERSION = "2.1";
     private static final boolean USE_POOL = 
         
Boolean.valueOf(System.getProperty("org.apache.jasper.runtime.JspFactoryImpl.USE_POOL",
 "true")).booleanValue();
+    private static final boolean THREAD_LOCAL_POOL = 
+        
Boolean.valueOf(System.getProperty("org.apache.jasper.runtime.JspFactoryImpl.THREAD_LOCAL_POOL",
 "true")).booleanValue();
 
     private SimplePool pool = new SimplePool( 100 );
-    
-    public PageContext getPageContext(Servlet servlet,
-                                     ServletRequest request,
-                                      ServletResponse response,
-                                      String errorPageURL,                    
-                                      boolean needsSession,
-                                     int bufferSize,
-                                      boolean autoflush) {
-
-       if( Constants.IS_SECURITY_ENABLED ) {
-           PrivilegedGetPageContext dp = new PrivilegedGetPageContext(
-               (JspFactoryImpl)this, servlet, request, response, errorPageURL,
-                needsSession, bufferSize, autoflush);
-           return (PageContext)AccessController.doPrivileged(dp);
-       } else {
-           return internalGetPageContext(servlet, request, response,
-                                         errorPageURL, needsSession,
-                                         bufferSize, autoflush);
-       }
+
+    public PageContext getPageContext(Servlet servlet, ServletRequest request,
+            ServletResponse response, String errorPageURL, boolean 
needsSession,
+            int bufferSize, boolean autoflush) {
+
+        if( Constants.IS_SECURITY_ENABLED ) {
+            PrivilegedGetPageContext dp = new PrivilegedGetPageContext(
+                    (JspFactoryImpl)this, servlet, request, response, 
errorPageURL,
+                    needsSession, bufferSize, autoflush);
+            return (PageContext)AccessController.doPrivileged(dp);
+        } else {
+            return internalGetPageContext(servlet, request, response,
+                    errorPageURL, needsSession,
+                    bufferSize, autoflush);
+        }
     }
 
     public void releasePageContext(PageContext pc) {
-       if( pc == null )
-           return;
+        if( pc == null )
+            return;
         if( Constants.IS_SECURITY_ENABLED ) {
             PrivilegedReleasePageContext dp = new PrivilegedReleasePageContext(
-                (JspFactoryImpl)this,pc);
+                    (JspFactoryImpl)this,pc);
             AccessController.doPrivileged(dp);
         } else {
             internalReleasePageContext(pc);
-       }
+        }
     }
 
     public JspEngineInfo getEngineInfo() {
         return new JspEngineInfo() {
-               public String getSpecificationVersion() {
-                   return SPEC_VERSION;
-               }
-           };
+            public String getSpecificationVersion() {
+                return SPEC_VERSION;
+            }
+        };
     }
 
-    private PageContext internalGetPageContext(Servlet servlet,
-                                              ServletRequest request,
-                                              ServletResponse response, 
-                                              String errorPageURL, 
-                                              boolean needsSession,
-                                              int bufferSize, 
-                                              boolean autoflush) {
+    private PageContext internalGetPageContext(Servlet servlet, ServletRequest 
request,
+            ServletResponse response, String errorPageURL, boolean 
needsSession,
+            int bufferSize, boolean autoflush) {
         try {
             PageContext pc;
             if( USE_POOL ) {
@@ -118,69 +112,59 @@
 
     private void internalReleasePageContext(PageContext pc) {
         pc.release();
-       if (USE_POOL && (pc instanceof PageContextImpl)) {
-           pool.put( pc );
-       }
+        if (USE_POOL && (pc instanceof PageContextImpl)) {
+            pool.put( pc );
+        }
     }
 
     private class PrivilegedGetPageContext implements PrivilegedAction {
 
-       private JspFactoryImpl factory;
-       private Servlet servlet;
-       private ServletRequest request;
-       private ServletResponse response;
-       private String errorPageURL;
-       private boolean needsSession;
-       private int bufferSize;
-       private boolean autoflush;
-
-       PrivilegedGetPageContext(JspFactoryImpl factory,
-                                Servlet servlet,
-                                ServletRequest request,
-                                ServletResponse response,
-                                String errorPageURL,
-                                boolean needsSession,
-                                int bufferSize,
-                                boolean autoflush) {
-           this.factory = factory;
-           this.servlet = servlet;
-           this.request = request;
-           this.response = response;
-           this.errorPageURL = errorPageURL;
-           this.needsSession = needsSession;
-           this.bufferSize = bufferSize;
-           this.autoflush = autoflush;
-       }
- 
-       public Object run() {
-           return factory.internalGetPageContext(servlet,
-                                                 request,
-                                                 response,
-                                                 errorPageURL,
-                                                 needsSession,
-                                                 bufferSize,
-                                                 autoflush);
-       }
+        private JspFactoryImpl factory;
+        private Servlet servlet;
+        private ServletRequest request;
+        private ServletResponse response;
+        private String errorPageURL;
+        private boolean needsSession;
+        private int bufferSize;
+        private boolean autoflush;
+
+        PrivilegedGetPageContext(JspFactoryImpl factory, Servlet servlet,
+                ServletRequest request, ServletResponse response, String 
errorPageURL,
+                boolean needsSession, int bufferSize, boolean autoflush) {
+            this.factory = factory;
+            this.servlet = servlet;
+            this.request = request;
+            this.response = response;
+            this.errorPageURL = errorPageURL;
+            this.needsSession = needsSession;
+            this.bufferSize = bufferSize;
+            this.autoflush = autoflush;
+        }
+
+        public Object run() {
+            return factory.internalGetPageContext(servlet, request, response,
+                    errorPageURL, needsSession, bufferSize, autoflush);
+        }
     }
 
     private class PrivilegedReleasePageContext implements PrivilegedAction {
 
         private JspFactoryImpl factory;
-       private PageContext pageContext;
+        private PageContext pageContext;
 
         PrivilegedReleasePageContext(JspFactoryImpl factory,
-                                    PageContext pageContext) {
+                PageContext pageContext) {
             this.factory = factory;
             this.pageContext = pageContext;
         }
 
         public Object run() {
             factory.internalReleasePageContext(pageContext);
-           return null;
+            return null;
         }
     }
-    
-       public JspApplicationContext getJspApplicationContext(ServletContext 
context) {
+
+    public JspApplicationContext getJspApplicationContext(ServletContext 
context) {
         return JspApplicationContextImpl.getInstance(context);
-       }
+    }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to