From b53425e6b036f6760a5d0a98537f99b8d9509d34 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 26 Feb 2019 17:58:50 +0300 Subject: Fix recommendations set in API --- src/main/java/com/juick/User.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3