Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-891

RequestImpl.getSession(true) is broken

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.1.0.5
    • 5.3
    • tapestry-core
    • 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());

      Attachments

        1. RequestImplTest.java
          6 kB
          Olle Hallin
        2. RequestImpl.java
          4 kB
          Olle Hallin

        Activity

          People

            hlship Howard Lewis Ship
            hitoha Olle Hallin
            Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: