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

Improvement of SessionApplicationStatePersistenceStrategy

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.4
    • Component/s: None
    • Labels:

      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 Michael Mikhulya for the idea.

        Attachments

        1. TAP5-2479.patch
          0.8 kB
          Maria Fedotova

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: