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

@ToString throws an NPE for POJO with null field

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.5
    • None
    • None

    Description

      import groovy.transform.*
      
      @ToString(pojo=true)
      @CompileStatic
      class Clazz {
          String field = null
      }
      
      println new Clazz() // 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: