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

Incorrect Map Property get

    XMLWordPrintableJSON

    Details

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

      Description

      If I try to execute jelly statement that assigns values to map and gets values from that map after. In one particular case map value is not accessible, I assume there is an error.

      "var x = new ("java.util.HashMap"); x.one = 1; x.two = 2; x.one" results to 1
      "x = new ("java.util.HashMap"); x.one = 1; x.two = 2; x.one" results to 1
      "x = new ("java.util.HashMap"); x.one = 1; x.two = 2; x['one']" results to 1
      "var x = new ("java.util.HashMap"); x.one = 1; x.two = 2; x['one']" result to null

      The script is evaluated in the following usual manner:

      ...
      Script s = jexl.createScript(expr);
      try {
      Object result = s.execute(jc);
      ..

      I'm ready to provide more details if nessesary

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: