Uploaded image for project: 'Commons JEXL'
  1. Commons JEXL
  2. JEXL-135

using map as script parameter or local variable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.1.2, 3.0
    • Labels:
      None

      Description

      On behalf of Tomas Kukosa:

      Hello,

      I use jexl 2.1.1 and I can not access map passed as a script parameter.

      When I have the script with 'stat' parameter and following code:
      var a = state; ## OK
      var b = state[3]; ## ERROR
      the first assignment works OK but the second fails with the reason 'undefined variable state'
      Also I can see that the interpreter tried to get 'state' variable from context.

      The same result is seen if parameter is assigned to local variable and then it is accessed through it.

      Is it a bug or intentional behavior?

      Regards,
      Tomas

        Activity

        Hide
        henrib Henri Biestro added a comment -

        Update issues resolved in 3.0 to closed

        Show
        henrib Henri Biestro added a comment - Update issues resolved in 3.0 to closed
        Hide
        henrib Henri Biestro added a comment -

        Committed 1332806.
        Fix in parser.jjt, identifiers used in array access expression were not checked against local variables.

        Show
        henrib Henri Biestro added a comment - Committed 1332806. Fix in parser.jjt, identifiers used in array access expression were not checked against local variables.

          People

          • Assignee:
            henrib Henri Biestro
            Reporter:
            henrib Henri Biestro
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development