commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "dion gillard (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (JEXL-25) Call method with varargs
Date Sun, 28 Oct 2007 08:29:50 GMT

     [ https://issues.apache.org/jira/browse/JEXL-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

dion gillard resolved JEXL-25.
------------------------------

    Resolution: Fixed

Code has been brought across from JEXL 1.x stream and a test added.

> Call method with varargs
> ------------------------
>
>                 Key: JEXL-25
>                 URL: https://issues.apache.org/jira/browse/JEXL-25
>             Project: Commons JEXL
>          Issue Type: New Feature
>    Affects Versions: 1.1
>         Environment: All
>            Reporter: Marek Lewczuk
>            Priority: Critical
>             Fix For: 2.0
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message