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

unmodifiable List iterator() implementations should not be ListIterators

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 11
    • None
    • core-libs
    • None

        The unmodifiable List implementations (in ImmutableCollections.java) have a ListItr implementation, instances of which are returned by both the iterator() and listIterator() methods. If created by the iterator() call, the implementation should defend against it being used as a ListIterator. See Hashtable.Enumerator for an example of a single class that implements multiple roles.

              smarks Stuart Marks
              smarks Stuart Marks
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: