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

Scoping bug results in a null pointer exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-JSR-3, 1.0-JSR-4
    • 1.0-JSR-5
    • None
    • None
    • Ubuntu Linux, x86, Sun Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)

    Description

      The following produces a null pointer exception:

      if (true)
      {
      [1,2].each

      { rs = "foo" }

      }
      else
      {
      rs = "bar"
      }

      adding 'def rs' to the start fixes the issue.

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            pldms Damian Steer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: