You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by sv...@apache.org on 2013/04/30 09:28:24 UTC

git commit: Revert "WICKET-5103 update session id on detach as in Wicket 1.4.x"

Updated Branches:
  refs/heads/wicket-1.5.x c966ce218 -> d9dfb36b4


Revert "WICKET-5103 update session id on detach as in Wicket 1.4.x"

This reverts commit 1d4c52f15e2a68d57b8de2845581dc824650ec36.


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/d9dfb36b
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/d9dfb36b
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/d9dfb36b

Branch: refs/heads/wicket-1.5.x
Commit: d9dfb36b4d6b9ab4bac65a4111d9ae15c8544454
Parents: c966ce2
Author: svenmeier <sv...@apache.org>
Authored: Tue Apr 30 09:27:14 2013 +0200
Committer: svenmeier <sv...@apache.org>
Committed: Tue Apr 30 09:27:14 2013 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/wicket/Session.java   |   23 ++++-----------
 1 files changed, 6 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/d9dfb36b/wicket-core/src/main/java/org/apache/wicket/Session.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/Session.java b/wicket-core/src/main/java/org/apache/wicket/Session.java
index 7cc2f07..37624e4 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Session.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Session.java
@@ -356,15 +356,18 @@ public abstract class Session implements IClusterable, IEventSink
 	/**
 	 * Gets the unique id for this session from the underlying SessionStore. May be
 	 * <code>null</code> if a concrete session is not yet created.
-	 * 
+	 *
 	 * @return The unique id for this session or null if it is a temporary session
 	 */
 	public final String getId()
 	{
 		if (id == null)
 		{
-			updateId();
-
+			RequestCycle requestCycle = RequestCycle.get();
+			if (requestCycle != null)
+			{
+				id = getSessionStore().getSessionId(requestCycle.getRequest(), false);
+			}
 			// we have one?
 			if (id != null)
 			{
@@ -374,15 +377,6 @@ public abstract class Session implements IClusterable, IEventSink
 		return id;
 	}
 
-	private void updateId()
-	{
-		RequestCycle requestCycle = RequestCycle.get();
-		if (requestCycle != null)
-		{
-			id = getSessionStore().getSessionId(requestCycle.getRequest(), false);
-		}
-	}
-
 	/**
 	 * Get this session's locale.
 	 *
@@ -641,11 +635,6 @@ public abstract class Session implements IClusterable, IEventSink
 		{
 			invalidateNow();
 		}
-		else
-		{
-			// WICKET-5103 container might have changed id
-			updateId();
-		}
 	}
 
 	/**