Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 2.0
    • Labels:
      None
    • Environment:

      All

      Description

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

        Activity

        Henri Biestro made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Henri Biestro added a comment -

        Bulk change issues closed by JEXL 2.0.

        Show
        Henri Biestro added a comment - Bulk change issues closed by JEXL 2.0.
        dion gillard made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        dion gillard added a comment -

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

        Show
        dion gillard added a comment - Code has been brought across from JEXL 1.x stream and a test added.
        Dmitry Nezhevenko committed 589302 (1 file)
        Reviews: none

        JEXL-25 Add test for varargs
        Move method tests to own test class

        Dmitry Nezhevenko committed 589299 (1 file)
        Dmitry Nezhevenko committed 589298 (1 file)
        Dmitry Nezhevenko committed 589295 (1 file)
        Dmitry Nezhevenko committed 589294 (1 file)
        Dmitry Nezhevenko committed 589292 (1 file)
        Dmitry Nezhevenko committed 589290 (1 file)
        Dmitry Nezhevenko committed 589289 (1 file)
        Dmitry Nezhevenko committed 589287 (1 file)
        Dmitry Nezhevenko committed 589286 (1 file)
        dion gillard made changes -
        Fix Version/s 2.0 [ 12312031 ]
        Hide
        peter royal added a comment -

        I've updated the Uberspect code with the latest from Velocity, which brings varargs support

        Show
        peter royal added a comment - I've updated the Uberspect code with the latest from Velocity, which brings varargs support
        peter royal committed 584046 (17 files)
        Reviews: none

        Refresh the introspection code with the latest from Velocity (mostly) to gain varargs support (for JEXL-25)

        commons trunk
        dion gillard made changes -
        Field Original Value New Value
        Issue Type Bug [ 1 ] New Feature [ 2 ]
        Marek Lewczuk created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Marek Lewczuk
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development