}
else {
env = new HashMap<String, Object>(env);
for (String variableName : env.keySet()) {
if (AviatorEvaluator.FUNC_MAP.containsKey(variableName)) {
throw new ExpressionRuntimeException(variableName
+ " is a function name,please don't use it as variable");
}
}
env.putAll(AviatorEvaluator.FUNC_MAP);
}
try {
return this.runMethod.invoke(null, env);
}
catch (InvocationTargetException e) {
if (e.getCause() != null) {
throw new ExpressionRuntimeException("Execute expression error", e.getCause());
}
else {
throw new ExpressionRuntimeException("Execute expression error", e);
}
}
catch (Throwable e) {
throw new ExpressionRuntimeException("Execute expression error", e);
}
}