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

@AutoClone excludes param works correctly only for COPY_CONSTRUCTOR AutoCloneStyle

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.0, 1.8.8
    • 2.1.0-rc-2, 2.1.0, 1.8.9, 2.0.7
    • None
    • None

    Description

      It seems the clone() method added by AST transformation due to @AutoClone annotation doesn't correctly use info inserted in 'excludes' annotation param with CLONE and SERIALIZATION AutoCloneStyle (http://groovy.codehaus.org/gapi/groovy/transform/AutoClone.html)

      It correctly works only for COPY_CONSTRUCTOR AutoCloneStyle

      @AutoClone(style=COPY_CONSTRUCTOR, excludes = 'last')
      class Person_C {
      String first, last
      }

      Please refer to my testcase published at http://groovyconsole.appspot.com/script/830001

      Attachments

        Activity

          People

            paulk Paul King
            joshua68it Giovanni Siano
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: