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

(coll) Minor doc fixes

XMLWordPrintable

      A DESCRIPTION OF THE PROBLEM :
      The documentation of the generic class AbstractList<E> as a whole contains these two texts:
      set(int index, Object element)
      add(int index, Object element)

      Only a few lines below, those methods are referenced in their new (correct) form:
      set(int index, E element)
      add(int index, E element)


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
        To implement a modifiable list, the programmer must additionally override the set(int index, E element) method (which otherwise throws an UnsupportedOperationException. If the list is variable-size the programmer must additionally override the add(int index, E element) and remove(int index) methods.
      ACTUAL -
        To implement a modifiable list, the programmer must additionally override the set(int index, Object element) method (which otherwise throws an UnsupportedOperationException. If the list is variable-size the programmer must additionally override the add(int index, Object element) and remove(int index) methods.

      URL OF FAULTY DOCUMENTATION :
      http://download.java.net/jdk6/docs/api/java/util/AbstractList.html

            martin Martin Buchholz
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: