[ 
https://issues.apache.org/jira/browse/WW-3523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923772#action_12923772
 ] 

Lukasz Lenart commented on WW-3523:
-----------------------------------

I think this is the answer for your question:


            // TODO:  This is a hacky workaround until javassist supports 
varargs method invocations

            boolean varArgs = OgnlRuntime.isJdk15() && m.isVarArgs();

            if (varArgs)
            {
                throw new UnsupportedCompilationException("Javassist does not 
currently support varargs method calls");
            }


> OGNL Varargs method invocation fails
> ------------------------------------
>
>                 Key: WW-3523
>                 URL: https://issues.apache.org/jira/browse/WW-3523
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Expression Language
>    Affects Versions: 2.2.1
>         Environment: Websphere 6.1
>            Reporter: Alfredo Osorio
>
> I'm getting java.lang.IllegalArgumentException when trying to invoke a vararg 
> method with OGNL.
> Here is an example of the method signature:
> public String sayHello(String... names);
> Expression used to invoke it
> sayHello('Alfred', 'John')
> assuming that the bean with the method has been pushed onto the ValueStack.
>  I think it has something to do with:
> ognl.OgnlRuntime.callAppropriateMethod(...)
> and the arguments being sent to:
> invokeMethod(target, method, convertedArgs);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to