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

DOC: Error in the documentation of java.util.ListIterator.add()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.4.0
    • docs
    • beta3
    • generic
    • generic



      Name: rmT116609 Date: 09/19/2001


      In the API for ListIterator.add method it can be read:

      "
      ClassCastException - if the class of the specified element prevents it from being added to this Set.

      IllegalArgumentException - if some aspect of this element prevents it from being added to this Collection.
      "

      But you can't get a ListIterator for a Collection or Set compile-time type so I guess the words Set and
      Collection should be replaced by List, in the ListIterator.set() method
      (Review ID: 132189)
      ======================================================================

            shommel Scott Hommel (Inactive)
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: