https://issues.apache.org/bugzilla/show_bug.cgi?id=48643

--- Comment #3 from Sebb <s...@apache.org> 2010-01-31 03:23:42 UTC ---
(In reply to comment #2)
> (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

It's not a question of trying to 'please' Eclipse. 
It has reported a possible error; in this case manual inspection shows that it
was correct to do so.

> 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.

In which case I think the try catch block can be removed entirely.

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

Agreed. So why try to close oos?

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

Disagree - it's confusing to have code that cannot be executed.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to