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

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 8
    • tools
    • None
    • b82
    • Verified

      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.

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

              Created:
              Updated:
              Resolved: