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

Array literal with variable parts never re-evaluated

    XMLWordPrintableJSON

    Details

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

      Description

      Suppose there are two integer variables 'one' (with value 1) and 'two' (with value 2). Now I create an array variable with this expression:

      myArray = [ one, two ]

      Now I change the values of these variables later ('one' to 5 and 'two' to 6), and evaluate the same expression again:

      myArray = [ one, two ]

      Now I would expect "myArray" to be created again, this time with values 5 and 6. However, the second time, nothing really happens. Internally, "myArray" remains the same array from the first invocation (same Java String array object instance), with the same values (1 and 2). But since I was using variables with different values in the expression, I would expect the array to change / be re-created.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              marcelschoen Marcel Schoen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: