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

JexlScript.getVariables returns strange values for array access

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.2
    • Labels:
      None

      Description

      I can not understand the logic behind the current implementation of JexlScript.getVariables() method. From the documentation we know that the result should be the set of script variables. For the code

      a[b][c]

      it gives three variables a, b, c. So far so good. But for the code

      a[b]['c']

      it returns a and b c, where second variable has two fragments b and c. The documentation states that variables with multiple fragments are ant-ish variables, but I don't have any of ant-ish variables in the example, and 'c' is not a variable, but a constant. I expect to get a and b as a result.

        Attachments

          Activity

            People

            • Assignee:
              henrib Henri Biestro
              Reporter:
              dmitri_blinov Dmitri Blinov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: