enjoy 3.6 release ^_^
This commit is contained in:
@@ -21,28 +21,7 @@ import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import com.jfinal.template.EngineConfig;
|
||||
import com.jfinal.template.expr.Sym;
|
||||
import com.jfinal.template.expr.ast.Arith;
|
||||
import com.jfinal.template.expr.ast.Array;
|
||||
import com.jfinal.template.expr.ast.Assign;
|
||||
import com.jfinal.template.expr.ast.Compare;
|
||||
import com.jfinal.template.expr.ast.Const;
|
||||
import com.jfinal.template.expr.ast.Expr;
|
||||
import com.jfinal.template.expr.ast.ExprList;
|
||||
import com.jfinal.template.expr.ast.Field;
|
||||
import com.jfinal.template.expr.ast.ForCtrl;
|
||||
import com.jfinal.template.expr.ast.Id;
|
||||
import com.jfinal.template.expr.ast.IncDec;
|
||||
import com.jfinal.template.expr.ast.Index;
|
||||
import com.jfinal.template.expr.ast.Logic;
|
||||
import com.jfinal.template.expr.ast.Map;
|
||||
import com.jfinal.template.expr.ast.Method;
|
||||
import com.jfinal.template.expr.ast.NullSafe;
|
||||
import com.jfinal.template.expr.ast.RangeArray;
|
||||
import com.jfinal.template.expr.ast.SharedMethod;
|
||||
import com.jfinal.template.expr.ast.StaticField;
|
||||
import com.jfinal.template.expr.ast.StaticMethod;
|
||||
import com.jfinal.template.expr.ast.Ternary;
|
||||
import com.jfinal.template.expr.ast.Unary;
|
||||
import com.jfinal.template.expr.ast.*;
|
||||
import com.jfinal.template.stat.Location;
|
||||
import com.jfinal.template.stat.ParaToken;
|
||||
import com.jfinal.template.stat.ParseException;
|
||||
|
@@ -73,9 +73,7 @@ public class Field extends Expr {
|
||||
if (fieldGetter.notNull()) {
|
||||
return fieldGetter.get(target, fieldName);
|
||||
}
|
||||
} catch (TemplateException e) {
|
||||
throw e;
|
||||
} catch (ParseException e) {
|
||||
} catch (TemplateException | ParseException e) {
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
throw new TemplateException(e.getMessage(), location, e);
|
||||
|
@@ -69,9 +69,9 @@ public class FieldGetters {
|
||||
java.lang.reflect.Method[] methodArray = targetClass.getMethods();
|
||||
for (java.lang.reflect.Method method : methodArray) {
|
||||
if (method.getName().equals(getterName) && method.getParameterTypes().length == 0) {
|
||||
if (MethodKit.isForbiddenMethod(getterName)) {
|
||||
throw new RuntimeException("Forbidden method: " + getterName);
|
||||
}
|
||||
// if (MethodKit.isForbiddenMethod(getterName)) {
|
||||
// throw new RuntimeException("Forbidden method: " + getterName);
|
||||
// }
|
||||
|
||||
return new GetterMethodFieldGetter(method);
|
||||
}
|
||||
|
@@ -88,9 +88,7 @@ public class Method extends Expr {
|
||||
}
|
||||
throw new TemplateException(buildMethodNotFoundSignature("public method not found: " + target.getClass().getName() + ".", methodName, argValues), location);
|
||||
|
||||
} catch (TemplateException e) {
|
||||
throw e;
|
||||
} catch (ParseException e) {
|
||||
} catch (TemplateException | ParseException e) {
|
||||
throw e;
|
||||
} catch (InvocationTargetException e) {
|
||||
Throwable t = e.getTargetException();
|
||||
|
@@ -63,9 +63,7 @@ public class SharedMethod extends Expr {
|
||||
throw new TemplateException(Method.buildMethodNotFoundSignature("Shared method not found: ", methodName, argValues), location);
|
||||
}
|
||||
|
||||
} catch (TemplateException e) {
|
||||
throw e;
|
||||
} catch (ParseException e) {
|
||||
} catch (TemplateException | ParseException e) {
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
throw new TemplateException(e.getMessage(), location, e);
|
||||
|
@@ -72,9 +72,7 @@ public class StaticMethod extends Expr {
|
||||
throw new TemplateException(Method.buildMethodNotFoundSignature("public static method not found: " + clazz.getName() + "::", methodName, argValues), location);
|
||||
}
|
||||
|
||||
} catch (TemplateException e) {
|
||||
throw e;
|
||||
} catch (ParseException e) {
|
||||
} catch (TemplateException | ParseException e) {
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
throw new TemplateException(e.getMessage(), location, e);
|
||||
|
Reference in New Issue
Block a user