6464import java .io .IOException ;
6565import java .io .OutputStreamWriter ;
6666import java .lang .reflect .Method ;
67- import java .security .AccessController ;
68- import java .security .PrivilegedActionException ;
69- import java .security .PrivilegedExceptionAction ;
7067import java .util .Enumeration ;
7168
7269import javax .servlet .RequestDispatcher ;
7875import javax .servlet .jsp .PageContext ;
7976import javax .servlet .jsp .tagext .BodyContent ;
8077
81- import org .apache .jasper .Constants ;
8278import org .apache .jasper .JasperException ;
8379import org .apache .jasper .compiler .Localizer ;
8480
@@ -101,35 +97,6 @@ public class JspRuntimeLibrary {
10197 private static final String JSP_EXCEPTION
10298 = "javax.servlet.jsp.jspException" ;
10399
104- protected static class PrivilegedIntrospectHelper
105- implements PrivilegedExceptionAction <Object > {
106-
107- private Object bean ;
108- private String prop ;
109- private String value ;
110- private ServletRequest request ;
111- private String param ;
112- private boolean ignoreMethodNF ;
113-
114- PrivilegedIntrospectHelper (Object bean , String prop ,
115- String value , ServletRequest request ,
116- String param , boolean ignoreMethodNF )
117- {
118- this .bean = bean ;
119- this .prop = prop ;
120- this .value = value ;
121- this .request = request ;
122- this .param = param ;
123- this .ignoreMethodNF = ignoreMethodNF ;
124- }
125-
126- public Object run () throws JasperException {
127- internalIntrospecthelper (
128- bean ,prop ,value ,request ,param ,ignoreMethodNF );
129- return null ;
130- }
131- }
132-
133100 /**
134101 * Returns the value of the javax.servlet.error.exception request
135102 * attribute value, if present, otherwise the value of the
@@ -339,27 +306,6 @@ public static void introspecthelper(Object bean, String prop,
339306 String value , ServletRequest request ,
340307 String param , boolean ignoreMethodNF )
341308 throws JasperException
342- {
343- if (Constants .IS_SECURITY_ENABLED ) {
344- try {
345- PrivilegedIntrospectHelper dp =
346- new PrivilegedIntrospectHelper (
347- bean ,prop ,value ,request ,param ,ignoreMethodNF );
348- AccessController .doPrivileged (dp );
349- } catch ( PrivilegedActionException pe ) {
350- Exception e = pe .getException ();
351- throw (JasperException )e ;
352- }
353- } else {
354- internalIntrospecthelper (
355- bean ,prop ,value ,request ,param ,ignoreMethodNF );
356- }
357- }
358-
359- private static void internalIntrospecthelper (Object bean , String prop ,
360- String value , ServletRequest request ,
361- String param , boolean ignoreMethodNF )
362- throws JasperException
363309 {
364310 Method method = null ;
365311 Class type = null ;
0 commit comments