Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-546

ClosedOutputStream#flush should throw

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.6
    • Streams/Writers
    • None

    Description

      While debugging an issue involving usage of CloseShieldOutputStream I discovered that ClosedOutputStream#flush is not overridden and will silently succeed. Not sure how much of a breaking change this might be but I think it makes more sense for ClosedOutputStream#flush to throw. This is only really meaningful in contexts where multiple streams are being chained together and some of the streams before CloseShieldOutputStream perform buffering, but it would make behavior more consistent for these more complex use-cases.

      Attachments

        1. IO-546.patch
          2 kB
          Tomas Celaya

        Issue Links

          Activity

            People

              pascalschumacher Pascal Schumacher
              tjcelaya Tomas Celaya
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: