You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by pa...@apache.org on 2013/01/08 19:55:47 UTC

[2/2] git commit: WICKET-4955: prevent race condition during sorting of sessions by using startDate

Updated Branches:
  refs/heads/master 1f1120aab -> bbdab9af4


WICKET-4955: prevent race condition during sorting of sessions by using startDate


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

Branch: refs/heads/master
Commit: c2422b828b067d0d916a60d34e2bc339aaf6b89c
Parents: 1f1120a
Author: Emond Papegaaij <em...@topicus.nl>
Authored: Tue Jan 8 16:40:51 2013 +0100
Committer: Emond Papegaaij <em...@topicus.nl>
Committed: Tue Jan 8 19:55:15 2013 +0100

----------------------------------------------------------------------
 .../wicket/protocol/http/IRequestLogger.java       |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/c2422b82/wicket-core/src/main/java/org/apache/wicket/protocol/http/IRequestLogger.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/protocol/http/IRequestLogger.java b/wicket-core/src/main/java/org/apache/wicket/protocol/http/IRequestLogger.java
index 8f6c2db..f712e92 100644
--- a/wicket-core/src/main/java/org/apache/wicket/protocol/http/IRequestLogger.java
+++ b/wicket-core/src/main/java/org/apache/wicket/protocol/http/IRequestLogger.java
@@ -279,16 +279,15 @@ public interface IRequestLogger
 		@Override
 		public int compareTo(SessionData sd)
 		{
-			int result = 0;
-			if (sd.lastActive > lastActive)
+			if (sd.startDate > startDate)
 			{
-				result = 1;
+				return 1;
 			}
-			else if (sd.lastActive < lastActive)
+			else if (sd.startDate < startDate)
 			{
-				result = -1;
+				return -1;
 			}
-			return result;
+			return 0;
 		}
 	}