Skip to content

[IO-546] ClosedOutputStream#flush should throw#42

Closed
tjcelaya wants to merge 1 commit into
apache:masterfrom
tjcelaya:fix/IO-546-ClosedOutputStream-flush
Closed

[IO-546] ClosedOutputStream#flush should throw#42
tjcelaya wants to merge 1 commit into
apache:masterfrom
tjcelaya:fix/IO-546-ClosedOutputStream-flush

Conversation

@tjcelaya

Copy link
Copy Markdown
Contributor

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.

See IO-546 where @dekobon has attached an example program.

@coveralls

coveralls commented Aug 18, 2017

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.06%) to 90.073% when pulling 854ed1d on tjcelaya:fix/IO-546-ClosedOutputStream-flush into 92a07f9 on apache:master.

@asfgit asfgit closed this in 8d5c46f Oct 13, 2017
@PascalSchumacher

Copy link
Copy Markdown
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants