From 5d2fbce9b5eb2384c997de7d8ad71a24f264e093 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Mon, 14 Nov 2011 16:07:10 +0100 Subject: [PATCH] added path to hashCode generation of changeset cache key --- .../scm/repository/ChangesetViewerUtil.java | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/scm-core/src/main/java/sonia/scm/repository/ChangesetViewerUtil.java b/scm-core/src/main/java/sonia/scm/repository/ChangesetViewerUtil.java index 1109c6eede..01562dbe5a 100644 --- a/scm-core/src/main/java/sonia/scm/repository/ChangesetViewerUtil.java +++ b/scm-core/src/main/java/sonia/scm/repository/ChangesetViewerUtil.java @@ -389,9 +389,7 @@ public class ChangesetViewerUtil extends PartCacheClearHook final ChangesetViewerCacheKey other = (ChangesetViewerCacheKey) obj; - if ((this.repository == null) - ? (other.repository != null) - : !this.repository.equals(other.repository)) + if (this.max != other.max) { return false; } @@ -403,12 +401,14 @@ public class ChangesetViewerUtil extends PartCacheClearHook return false; } - if (this.start != other.start) + if ((this.repository == null) + ? (other.repository != null) + : !this.repository.equals(other.repository)) { return false; } - if (this.max != other.max) + if (this.start != other.start) { return false; } @@ -425,13 +425,16 @@ public class ChangesetViewerUtil extends PartCacheClearHook @Override public int hashCode() { - int hash = 3; + int hash = 7; - hash = 67 * hash + ((this.repository != null) + hash = 89 * hash + this.max; + hash = 89 * hash + ((this.path != null) + ? this.path.hashCode() + : 0); + hash = 89 * hash + ((this.repository != null) ? this.repository.hashCode() : 0); - hash = 67 * hash + this.start; - hash = 67 * hash + this.max; + hash = 89 * hash + this.start; return hash; }