Skip to content

Commit

Permalink
Remove unnecessary code
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1754714 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
markt-asf committed Aug 1, 2016
1 parent 4c84818 commit a6b1ebc
Showing 1 changed file with 1 addition and 58 deletions.
59 changes: 1 addition & 58 deletions java/org/apache/jasper/runtime/JspRuntimeLibrary.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -23,9 +22,6 @@
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;
Expand All @@ -37,7 +33,6 @@
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;
Expand All @@ -56,36 +51,6 @@
*/
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
Expand Down Expand Up @@ -294,29 +259,7 @@ public static void introspect(Object bean, ServletRequest request)
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;
Expand Down

0 comments on commit a6b1ebc

Please sign in to comment.