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

Description error in JavaDoc for java.util.HashSet

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 6u24
    • infrastructure
    • x86
    • windows_7

      A DESCRIPTION OF THE PROBLEM :
      HashSet implementation relies on hashCode for objects kept in Set and not on the equals.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      if this set contains no element e2 such that (e==null ? e2==null : e.hashCode()==e2.hashCode).
      ACTUAL -
      if this set contains no element e2 such that (e==null ? e2==null : e.equals(e2)).

      URL OF FAULTY DOCUMENTATION :
      http://download.oracle.com/javase/6/docs/api/java/util/HashSet.html#add(E)

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: