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

(coll) AbstractList.ListItr.add might corrupt iterator state if enclosing add throws

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 7
    • 7
    • core-libs
    • b15
    • generic
    • generic
    • Not verified

      While following up on

      6529795: (coll) Iterator.remove() fails if next() threw NoSuchElementException

      it was noticed that AbstractList.ListItr.add(E) has a similar very small blemish.
      if enclosing add fails, then the iterator might be modified, possibly into an impossible
      state.

            martin Martin Buchholz
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: