Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
5.1.0.5
-
None
Description
I think that the implementation of org.apache.tapestry5.internal.services.RequestImpl.getSession(true) is broken.
It returns an old invalidated session instead of creating a new.
IMO this is a bug since it behaves differently than HttpServletRequest.getSession(true).
This is the expected behaviour:
1. Session s1 = request.getSession(true);
2. s1.invalidate();
3. Session s2 = request.getSession(true);
4. assertNotNull(s2);
5. assertNotSame(s1, s2);
6. assertFalse(s2.isInvalidated());