You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by jk...@apache.org on 2015/05/18 09:42:00 UTC
tapestry-5 git commit: TAP5-2479: build the session attribute key
only if there is an active session
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 <jo...@eddyson.de>
Authored: Mon May 18 09:40:51 2015 +0200
Committer: Jochen Kemnade <jo...@eddyson.de>
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;
}
}