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

OGNL Varargs method invocation fails

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.2.1
    • Component/s: Expression Language
    • Labels:
      None
    • Environment:

      Websphere 6.1

    • Flags:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: