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

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 8
    • 8
    • tools
    • None
    • b82
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: