added path to hashCode generation of changeset cache key

This commit is contained in:
Sebastian Sdorra
2011-11-14 16:07:10 +01:00
parent cd44c8b3b9
commit 5d2fbce9b5

View File

@@ -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;
}