groovy
  1. groovy
  2. GROOVY-4979

@ToString creates additional unneeded field

    Details

    • Number of attachments :
      0

      Description

      Using @ToString(includeNames = true) inserts a field called $print$names into the class. This field is neither transient nor static, which causes havoc when using XStream.

      Example XStream output:

      [
        {
          "name": "み +()[]{}.mp3",
          "size": 690037,
          "outputSize": 0,
          "format": {
            "codec": "mp3",
            "name": "mp3",
            "bitDepth": "s16le",
            "samplingRate": 44100,
            "channels": 2,
            "$print$names": true
          }
        }
      ]
      

      I don't understand why the field is there in the first place since printNames is a compile-time thing.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Paul King
            Reporter:
            Johann Burkard
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: