Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-2867

Impossible to use Map.get() or put() inside use(DOMCategory)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.4, 1.5.5, 1.5.6, 1.6-beta-1
    • Fix Version/s: 1.5.7, 1.6-beta-2
    • Component/s: XML Processing
    • Labels:
      None
    • Environment:
      Grails 1.0.2 (dont know exactly to which Groovy version this corresponds).

      Description

      Inside a Grails Gant script, the following works

      target(strange: "Test something")
      {
             Map ids = [:]
      
             ids.put("try", "sample1")
             assert ids.get("try") == "sample1"
      
             use (DOMCategory)
             {
                     ids["try"] = "sample2"
                     assert ids["try"] == "sample2"
             }
      }
      

      but the second assert in the following fails:

      target(strange: "Test something")
      {
             Map ids = [:]
      
             ids.put("try", "sample1")
             assert ids.get("try") == "sample1"
      
             use (DOMCategory)
             {
                     ids.put("try", "sample2")
                     assert ids.get("try") == "sample2"
             }
      }
      

        Attachments

          Activity

            People

            • Assignee:
              paulk Paul King
              Reporter:
              elvanor Jean-Noel Rivasseau
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: