commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marek Lewczuk (JIRA)" <>
Subject [jira] Created: (JEXL-25) Call method with varargs
Date Sun, 08 Oct 2006 18:52:19 GMT
Call method with varargs

                 Key: JEXL-25
             Project: Commons JEXL
          Issue Type: Bug
    Affects Versions: 1.1
         Environment: All
            Reporter: Marek Lewczuk
            Priority: Critical

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) {
  return "Test";

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

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message