tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1754714 - /tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java
Date Mon, 01 Aug 2016 09:22:51 GMT
Author: markt
Date: Mon Aug  1 09:22:51 2016
New Revision: 1754714

URL: http://svn.apache.org/viewvc?rev=1754714&view=rev
Log:
Remove unnecessary code

Modified:
    tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java

Modified: tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java?rev=1754714&r1=1754713&r2=1754714&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java (original)
+++ tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java Mon Aug  1 09:22:51
2016
@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.jasper.runtime;
 
 import java.beans.PropertyEditor;
@@ -23,9 +22,6 @@ import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.OutputStreamWriter;
 import java.lang.reflect.Method;
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
 import java.util.Enumeration;
 
 import javax.servlet.RequestDispatcher;
@@ -37,7 +33,6 @@ import javax.servlet.jsp.JspWriter;
 import javax.servlet.jsp.PageContext;
 import javax.servlet.jsp.tagext.BodyContent;
 
-import org.apache.jasper.Constants;
 import org.apache.jasper.JasperException;
 import org.apache.jasper.compiler.Localizer;
 import org.apache.jasper.util.ExceptionUtils;
@@ -56,36 +51,6 @@ import org.apache.jasper.util.ExceptionU
  */
 public class JspRuntimeLibrary {
 
-    protected static class PrivilegedIntrospectHelper
-        implements PrivilegedExceptionAction<Void> {
-
-        private final Object bean;
-        private final String prop;
-        private final String value;
-        private final ServletRequest request;
-        private final String param;
-        private final boolean ignoreMethodNF;
-
-        PrivilegedIntrospectHelper(Object bean, String prop,
-                                   String value, ServletRequest request,
-                                   String param, boolean ignoreMethodNF)
-        {
-            this.bean = bean;
-            this.prop = prop;
-            this.value = value;
-            this.request = request;
-            this.param = param;
-            this.ignoreMethodNF = ignoreMethodNF;
-        }
-
-        @Override
-        public Void run() throws JasperException {
-            internalIntrospecthelper(
-                bean,prop,value,request,param,ignoreMethodNF);
-            return null;
-        }
-    }
-
     /**
      * Returns the value of the javax.servlet.error.exception request
      * attribute value, if present, otherwise the value of the
@@ -294,29 +259,7 @@ public class JspRuntimeLibrary {
     public static void introspecthelper(Object bean, String prop,
                                         String value, ServletRequest request,
                                         String param, boolean ignoreMethodNF)
-                                        throws JasperException
-    {
-        if( Constants.IS_SECURITY_ENABLED ) {
-            try {
-                PrivilegedIntrospectHelper dp =
-                    new PrivilegedIntrospectHelper(
-                        bean,prop,value,request,param,ignoreMethodNF);
-                AccessController.doPrivileged(dp);
-            } catch( PrivilegedActionException pe) {
-                Exception e = pe.getException();
-                throw (JasperException)e;
-            }
-        } else {
-            internalIntrospecthelper(
-                bean,prop,value,request,param,ignoreMethodNF);
-        }
-    }
-
-    private static void internalIntrospecthelper(Object bean, String prop,
-                                        String value, ServletRequest request,
-                                        String param, boolean ignoreMethodNF)
-                                        throws JasperException
-    {
+                                        throws JasperException {
         Method method = null;
         Class<?> type = null;
         Class<?> propertyEditorClass = null;



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


Mime
View raw message