[RFC][Icedtea-web]: Close streams after opening them.
omajid at redhat.com
Mon Mar 7 13:30:20 PST 2011
On 03/07/2011 04:01 PM, Andrew Su wrote:
>> Subject: Re: [RFC][Icedtea-web]: Close streams after opening them.
>>> Questions, comments, concerns?
>> Maybe it would be better to put the close() in a "finally" block
>> after the catch?
> I don't think that'd be necessary, since if an exception was thrown. The stream won't be open.
store(s, header) can throw an IOException too. I agree with Dennis;
s.close() should be in a finally block. I also see similar code in
PropertiesFile.load(): an InputStream is never closed. Can you please
fix that too?
More information about the distro-pkg-dev