mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
8059625670
The invalidate() method in MockHttpSession is currently implemented incorrectly. According to the Servlet specification, the method should throw an IllegalStateException if it is invoked on an already invalidated session. However, invoking invalidate() on the same MockHttpSession instance multiple times does not throw an exception. This commits addresses this issue by checking the invalid field and throwing an IllegalStateException if it has already been set to true. Issue: SPR-9686