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

null.setProperty yields confusing error message

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0
    • 1.5.2
    • None
    • None
    • Groovy Version: 1.0 JVM: 1.5.0_10-b03

    Description

      C:\>groovy -e "null.setProperty('foo','bar')"
      Caught: groovy.lang.MissingPropertyException: No such property: foo for class: org.codehaus.groovy.runtime.NullObject
      at script_from_command_line.run(script_from_command_line:1)
      at script_from_command_line.main(script_from_command_line)

      At least I would expect a nice and familiar NPE

      Attachments

        Activity

          People

            paulk Paul King
            antti.karanta@napa.fi Antti Karanta
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: