Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3523

OGNL Varargs method invocation fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 2.2.1
    • 2.2.1
    • Expression Language
    • None
    • Websphere 6.1

    • Important

    Description

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

      Attachments

        Activity

          People

            Unassigned Unassigned
            aosorio Alfredo Osorio
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: