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

javac should issue a warning for overriding equals without hashCode

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 7
    • Fix Version/s: 8
    • Component/s: tools
    • Subcomponent:
    • Resolved In Build:
      b82
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      As discussed in "Effective Java" a common source of bugs is for a class to override equals without overriding hashCode. To reduce the incidence of this, javac could issue a warning when this occured.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              vromero Vicente Arturo Romero Zaldivar
              Reporter:
              darcy Joe Darcy
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: