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

@Immutable should not override toString() if provided in source

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7-beta-1
    • 1.6.5, 1.7-beta-2
    • None
    • None

    Description

      @Immutable class MyClass {
          String toString() { 'some return value' }
      }
      new MyClass()
      

      throws

      Repetitive method name/signature for method 'java.lang.String toString()' in class 'MyClass'.
       at line: 2, column: 5
      
      Repetitive method name/signature for method 'java.lang.String toString()' in class 'MyClass'.
       at line: -1, column: -1
      

      Attachments

        1. 17x_Patch.txt
          4 kB
          Roshan Dawrani

        Activity

          People

            paulk Paul King
            codevise Dierk König
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: