enjoy 3.6 release ^_^

This commit is contained in:
James
2019-01-30 21:09:07 +08:00
parent 972c7e7673
commit 4c63d00157
24 changed files with 456 additions and 85 deletions

View File

@@ -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);

View File

@@ -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);
}

View File

@@ -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();

View File

@@ -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);

View File

@@ -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);