Polish gh-1798

- Should throw IllegalStateException
This commit is contained in:
Eleftheria Stein
2021-03-25 09:55:32 +02:00
parent 8bd4374909
commit d2960b570f
2 changed files with 3 additions and 2 deletions

View File

@@ -312,7 +312,7 @@ public class SessionRepositoryFilter<S extends Session> extends OncePerRequestFi
}
if (SessionRepositoryFilter.this.httpSessionIdResolver instanceof CookieHttpSessionIdResolver
&& this.response.isCommitted()) {
throw new IllegalArgumentException("Cannot create a session after the response has been committed");
throw new IllegalStateException("Cannot create a session after the response has been committed");
}
if (SESSION_LOGGER.isDebugEnabled()) {
SESSION_LOGGER.debug(