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

A class with a @MapConstructor when supplied with no args throws NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • None
    • xforms
    • None

    Description

      @groovy.transform.MapConstructor
      class Foo {
          String bar
      }
      
      println new Foo(bar: 'baz').bar // OK
      println new Foo() // NPE
      

      Attachments

        Issue Links

          Activity

            People

              paulk Paul King
              paulk Paul King
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: