tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 48643] and load() - close() bugs
Date Sun, 31 Jan 2010 01:49:41 GMT

Konstantin Kolinko <> changed:

           What    |Removed                     |Added
           Severity|normal                      |minor

--- Comment #2 from Konstantin Kolinko <> 2010-01-30 17:49:39
UTC ---
(In reply to comment #0)
> Note: these bugs were detected by the Eclipse compiler.

I think it is pointless to try to please Eclipse IDE here. That "possible null
access check" is an optional feature (off by default), depends on the version
of IDE that you are using, and also buggy at times, as I experiences just
recently (it gave me contradictory tips regarding "unnecessary null check" for
one line, and then "possible null pointer access" for the same variable few
lines later). Then some other tool will start complaining that we have not
closed a stream there...

Back to the code: I'll agree that you are right that first oos.close(); is
actually never called,  but I do not think we need to close fos here.

I do not see what can fail in the "new ObjectOutputStream(new
BufferedOutputStream(fos))" line, besides maybe an OutOfMemoryError.

As of now, the code is easier to read, even if it is redundant.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message