Re: [compress] close() and writing invalid streams

2018-06-29 Thread Gary Gregory
I am saying that I prefer the option: public void close() throws IOException { try { finishFormatSpecificStuff(); } finally { closeUnderlyingStreamsOrChannelsAndOtherResources(); } } Gary On Fri, Jun 29, 2018 at 10:45 AM Stefan Bodewig wrote: > Hi Gary > > I'm

Re: [compress] close() and writing invalid streams

2018-06-29 Thread Stefan Bodewig
Hi Gary I'm afraid I don't really follow you here. close() doesn't open any resources so I'm not sure what try-with-resources can do here. Stefan On 2018-06-28, Gary Gregory wrote: > I'm for making it obvious and keeping clean ups localized, meaning add > try-with-resources blocks to all close(

Re: [compress] close() and writing invalid streams

2018-06-28 Thread Gary Gregory
I'm for making it obvious and keeping clean ups localized, meaning add try-with-resources blocks to all close() methods that need them. Gary On Thu, Jun 28, 2018 at 3:54 AM Stefan Bodewig wrote: > Hi all > > https://issues.apache.org/jira/browse/COMPRESS-457 raises an issue that > I vaguely rec

[compress] close() and writing invalid streams

2018-06-28 Thread Stefan Bodewig
Hi all https://issues.apache.org/jira/browse/COMPRESS-457 raises an issue that I vaguely recall we've talked about in the past but I may be wrong. Almost all our OutputStream close methods go along the lines of public void close() throws IOException { finishFormatSpecificStuff(); closeUn