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

(file) DirectoryStream#iterator's remove method throws wrong exception when stream is closed

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 7
    • Fix Version/s: 7
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b75
    • CPU:
      generic
    • OS:
      generic

      Description

      "Once a directory stream is closed, all further method invocations on the iterator throw ConcurrentModificationException with cause ClosedDirectoryStreamException".

      At this time (jdk7-b71), the remove method does not wrap the ClosedDirectoryStreamException in a CME.
      A second issue is that next/hasNext throw ConcurrentModificationException(IllegalStateException) rather than the more specific ConcurrentModificationException(ClosedDirectoryStreamException) as specified.

        Attachments

          Activity

            People

            • Assignee:
              alanb Alan Bateman
              Reporter:
              alanb Alan Bateman
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: