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

AutoClone AST transform replaces custom clone method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0-beta-1, 2.5.7
    • 2.5.8, 3.0.0-beta-2
    • Compiler
    • None

    Description

      A class defined as

      @groovy.transform.AutoClone
      class ClassUnderTest {
          Object clone() throws java.lang.CloneNotSupportedException { null }
      }
      

      Will override the definition of clone every single time.

      In contrast with @Canonical for example where explicit toString() is not overridden.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: