Details
-
New Feature
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
1.1
-
None
-
All
Description
Jexl doesn't allow for using method with varargs - method cannot be found and because of that expression returns null. Try following code:
class TestClass {
public String testVarArgs (Integer... args)
}
String jexlExp = "test.testVarArgs(1,2,3,4,5)";
Expression e = ExpressionFactory.createExpression(jexlExp);
JexlContext jc = JexlHelper.createContext();
jc.getVars().put("test", new TestClass());
Object o = e.evaluate(jc);