Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8008436

javac should not issue a warning for overriding equals without hasCode if hashCode has been overriden by a superclass

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b82
    • Verification:
      Verified

      Description

      The patch for JDK-6563143 has introduced a warning for overriding equals without hashCode, this fix has to be made more precise, such as warning if equals is overridden and hasCode is Objects.hashCode rather than requiring hashCode to be overriden in the same type.

      Also add source info to the warnings.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vromero Vicente Arturo Romero Zaldivar
                Reporter:
                vromero Vicente Arturo Romero Zaldivar
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: