414833 HttpSessionListener.destroy must be invoked in reverse order

This commit is contained in:
Jan Bartel 2013-08-12 12:11:06 +10:00
parent b17696325b
commit 8cf2744226
1 changed files with 5 additions and 3 deletions

View File

@ -796,9 +796,11 @@ public abstract class AbstractSessionManager extends AbstractLifeCycle implement
if (invalidate && _sessionListeners!=null)
{
HttpSessionEvent event=new HttpSessionEvent(session);
for (HttpSessionListener listener : _sessionListeners)
listener.sessionDestroyed(event);
HttpSessionEvent event=new HttpSessionEvent(session);
for (int i = _sessionListeners.size()-1; i>=0; i--)
{
_sessionListeners.get(i).sessionDestroyed(event);
}
}
}
}