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

Iterator.remove and forEachRemaining relationship not specified

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b91
    • Verification:
      Verified

      Description

      After forEachRemaining returns a subsequent remove() should remove the last element and not throw an exception. The default implementation on Iterator removes the last element, and optimized implementations of the default should remain consistent. Also check other ListIterator methods such as previous() and set().

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                akhil Akhil Arora (Inactive)
                Reporter:
                akhil Akhil Arora (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: