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

Incorrect Map Property get

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.1
    • 3.0
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: