Repository: tapestry-5
Updated Branches:
  refs/heads/master a77a6c251 -> 47e20f4c7


TAP5-2479: build the session attribute key only if there is an active session


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/47e20f4c
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/47e20f4c
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/47e20f4c

Branch: refs/heads/master
Commit: 47e20f4c7e3447d2486f6f2921ddbb0de04b70be
Parents: a77a6c2
Author: Jochen Kemnade <[email protected]>
Authored: Mon May 18 09:40:51 2015 +0200
Committer: Jochen Kemnade <[email protected]>
Committed: Mon May 18 09:40:51 2015 +0200

----------------------------------------------------------------------
 .../services/SessionApplicationStatePersistenceStrategy.java     | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/47e20f4c/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionApplicationStatePersistenceStrategy.java
----------------------------------------------------------------------
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionApplicationStatePersistenceStrategy.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionApplicationStatePersistenceStrategy.java
index eaad2ad..5d7e881 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionApplicationStatePersistenceStrategy.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionApplicationStatePersistenceStrategy.java
@@ -75,10 +75,8 @@ public class SessionApplicationStatePersistenceStrategy 
implements ApplicationSt
 
     public <T> boolean exists(Class<T> ssoClass)
     {
-        String key = buildKey(ssoClass);
-
         Session session = request.getSession(false);
 
-        return session != null && session.getAttribute(key) != null;
+        return session != null && session.getAttribute(buildKey(ssoClass)) != 
null;
     }
 }

Reply via email to