Uploaded image for project: 'SonarJava'
  1. SonarJava
  2. SONARJAVA-1614

FP on S1210: Classes annotated with lombok's @EqualsAndHashCode should be ignored

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.13
    • Component/s: Rules
    • Labels:
      None

      Description

      Classes annotated with lombok's annotation @lombok.EqualsAndHashCode, @lombok.Data or @lombok.Value should be ignored, as the equals and hashCode methods will be generated.

      @lombok.EqualsAndHashCode
       class MyClass implements Comparable<MyClass> { // should be compliant
         @Override
         public int compareTo(MyClass o) {
           return 0;
         }
       }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                michael.gumowski Michael Gumowski
                Reporter:
                michael.gumowski Michael Gumowski
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: