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

Improvement of SessionApplicationStatePersistenceStrategy

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 5.4
    • None

    Description

      This patch is little improvement in method exists of SessionApplicationStatePersistenceStrategy.

      public <T> boolean exists(Class<T> ssoClass)
          {
              String key = buildKey(ssoClass);
      
              Session session = request.getSession(false);
      
              return session != null && session.getAttribute(key) != null;
          }
      

      We changed the code so that the key is built only when the session is not null.
      This code didn't have effect on time per request, but I think it's useful.
      Thank mihasik for the idea.

      Attachments

        1. TAP5-2479.patch
          0.8 kB
          Maria Fedotova

        Activity

          People

            Unassigned Unassigned
            m.fedotova Maria Fedotova
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: