tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 48643] catalina.session.FileStore.save() and load() - close() bugs
Date Sun, 31 Jan 2010 01:10:38 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=48643

--- Comment #1 from Sebb <sebb@apache.org> 2010-01-30 17:10:36 UTC ---
There are similar problems in session.StandardManager.doUnload():

line 502, 530, and at line 542 there's a block of code:

// Flush and close the output stream
try {
    oos.flush();
    oos.close();
    oos = null;
} catch (IOException e) {
    if (oos != null) {
        try {
            oos.close();
        } catch (IOException f) {
            // Ignore
        }
        oos = null;
    }
    throw e;
}

This code looks as though it is trying to close() oos if the flush() fails, but
it will also try to close() oos if the close() fails.

Probably the first oos.close() should be removed. 
AFAICT, there is also no need to set the oos field to null.

-- 
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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message