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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 1.4.0
    • Affects Version/s: 1.3.0
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: