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

Object.hashCode() should reference System.identityHashCode()

XMLWordPrintable

    • b48
    • itanium
    • linux

      A DESCRIPTION OF THE PROBLEM :
      It would seem logical that the documentation for Object.hashCode() would refer to System.identityHashCode(), since they proportedly generate the same value, given the same object.

      Therefore I propose adding a "see also" reference in the API documentation for java.lang.Object that references System.identityHashCode().

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      ...

      @see java.lang.System#identityHashCode(Object)
      ACTUAL -
      ...

      (@see clause omitted)

      URL OF FAULTY DOCUMENTATION :
      http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()
      ###@###.### 2005-03-11 00:31:17 GMT

            darcy Joe Darcy
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: