aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-02-26 17:58:50 +0300
committerGravatar Vitaly Takmazov2019-02-26 17:58:50 +0300
commitb53425e6b036f6760a5d0a98537f99b8d9509d34 (patch)
tree23143588054b18c5caebb0b049758db247f62875
parentdafee9c471e154e375cca19f5e96c9c6fc89033f (diff)
Fix recommendations set in API
-rw-r--r--src/main/java/com/juick/User.java5
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