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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 5.0, 6u24, 6u29, 7
    • Fix Version/s: 8
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b04
    • CPU:
      generic, x86
    • OS:
      generic, linux, windows_2000
    • Verification:
      Verified

      Description

      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.

        Attachments

          Issue Links

            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: