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

HashSet(Collection) C-tor doesn't describe behaviour for null argumen

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.0
    • core-libs
    • beta2
    • sparc
    • solaris_2.5
    • Verified

      The current specification for constructor java.util.HashSet.HashSet (Collection) doesn't specify the result for null input, but the current implementation for this constructor does throw NullPointerException when the collection is null.

      This problem also happens on the the constructor LinkedList(Collection c) for class java.util.LinkedList. I got NullPointerException when the input is null, but it is not specified in the specification for this constructor.

            jjb Josh Bloch (Inactive)
            hji Huafang Ji (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: