diff options
-rw-r--r-- | src/main/java/com/juick/User.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/juick/User.java b/src/main/java/com/juick/User.java index f4c6b6db..84986010 100644 --- a/src/main/java/com/juick/User.java +++ b/src/main/java/com/juick/User.java @@ -65,12 +65,13 @@ public class User { @Override public boolean equals(Object obj) { return obj == this || - (obj instanceof User && ((User) obj).getUid() == this.getUid()); + (obj instanceof User && ((User) obj).getUid() == this.getUid() + && ((User) obj).getUri().toString().equals(this.getUri().toString())); } @Override public int hashCode() { - return Objects.hash(uid); + return Objects.hash(uid, uri); } @Override |