diff options
Diffstat (limited to 'org.eclipse.jgit/src')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java index 0406684ea7..25acee046c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java @@ -268,7 +268,10 @@ public class PersonIdent { } public int hashCode() { - return getEmailAddress().hashCode() ^ (int) when; + int hc = getEmailAddress().hashCode(); + hc *= 31; + hc += (int) (when / 1000L); + return hc; } public boolean equals(final Object o) { @@ -276,7 +279,7 @@ public class PersonIdent { final PersonIdent p = (PersonIdent) o; return getName().equals(p.getName()) && getEmailAddress().equals(p.getEmailAddress()) - && when == p.when; + && when / 1000L == p.when / 1000L; } return false; } |