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

Remove overlap between S2638 and S4454 with "nonnull" argument of "equals" method

    XMLWordPrintable

    Details

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

      Description

      When writing an equals method with a "Nonnull" annotation on the argument, we will raise two issues stating that null should be accepted, from both RSPEC-4454 and RSPEC-2638.

      RSPEC-4454 should be the only one to raise an issue on this code.

      @Override
      public boolean equals(@Nonnull Object obj) {
        return super.equals(obj);
      }
      

        Attachments

          Activity

            People

            Assignee:
            quentin.jaquier Quentin Jaquier
            Reporter:
            quentin.jaquier Quentin Jaquier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: