forked from I2P_Developers/i2p.i2p
SusiMail: Catch ISE in get/setAttribute() (ticket #1529)
This commit is contained in:
@ -1839,15 +1839,23 @@ public class WebMail extends HttpServlet
|
|||||||
*/
|
*/
|
||||||
private synchronized SessionObject getSessionObject( HttpSession httpSession )
|
private synchronized SessionObject getSessionObject( HttpSession httpSession )
|
||||||
{
|
{
|
||||||
SessionObject sessionObject = (SessionObject)httpSession.getAttribute( "sessionObject" );
|
SessionObject sessionObject = null;
|
||||||
|
try {
|
||||||
|
sessionObject = (SessionObject)httpSession.getAttribute("sessionObject");
|
||||||
|
} catch (IllegalStateException ise) {}
|
||||||
if( sessionObject == null ) {
|
if( sessionObject == null ) {
|
||||||
sessionObject = new SessionObject(_log);
|
sessionObject = new SessionObject(_log);
|
||||||
httpSession.setAttribute( "sessionObject", sessionObject );
|
try {
|
||||||
|
httpSession.setAttribute("sessionObject", sessionObject);
|
||||||
|
} catch (IllegalStateException ise) {}
|
||||||
if (_log.shouldDebug()) _log.debug("NEW session " + httpSession.getId());
|
if (_log.shouldDebug()) _log.debug("NEW session " + httpSession.getId());
|
||||||
} else {
|
} else {
|
||||||
if (_log.shouldDebug()) _log.debug("Existing session " + httpSession.getId() +
|
if (_log.shouldDebug()) {
|
||||||
" created " + new Date(httpSession.getCreationTime()));
|
try {
|
||||||
|
_log.debug("Existing session " + httpSession.getId() +
|
||||||
|
" created " + new Date(httpSession.getCreationTime()));
|
||||||
|
} catch (IllegalStateException ise) {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return sessionObject;
|
return sessionObject;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user