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

unmodifiable List iterator() implementations should not be ListIterators

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 11
    • Component/s: core-libs
    • Labels:
      None

      Backports

        Description

        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.

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: