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

Equals method doc needs reference to hashCode in Object class

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.3.0
    • docs
    • generic
    • generic



      Name: ddT132432 Date: 09/20/2001


      C:\>java -version
      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

      It is easy to override Object's equals method without overriding Object's
      hashCode method and thereby break the subclass's ability to be used as a key in
      a Hashtable. The documentation of the equals method should make reference to
      the fact that you may need to override the hashCode method.
      (Review ID: 132322)
      ======================================================================

            shommel Scott Hommel (Inactive)
            ddressersunw Daniel Dresser (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: