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

(spec) BufferedWriter.close leaves stream open if close of underlying Writer fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 5.0, 6u24, 6u29, 7
    • core-libs
    • None
    • b04
    • generic, x86
    • generic, linux, windows_2000
    • Verified

      This bug is submitted to track a discussion on core-libs-dev:
       http://mail.openjdk.java.net/pipermail/core-libs-dev/2011-January/005732.html

      In summary, BufferedWriter#close will fail with IOException and leave the stream open in the event that the close of the underlying Writer fails. BufferedReader has the same issue.

      A related issue is that FilterOutputStream#close doesn't propogate the exception from the flush if it fails when closing the stream.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: