From 9281dc5d4400ffc0afaa5fcd3dbbf7a83fbc5151 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 13 Oct 2015 09:54:01 +0200 Subject: [PATCH] =?utf8?q?also=20include=20user=20id=3F=20Signed-off-by:Ro?= =?utf8?q?land=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/org/mxchange/jusercore/model/user/LoginUser.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/org/mxchange/jusercore/model/user/LoginUser.java b/src/org/mxchange/jusercore/model/user/LoginUser.java index 5e9cd65..25950fa 100644 --- a/src/org/mxchange/jusercore/model/user/LoginUser.java +++ b/src/org/mxchange/jusercore/model/user/LoginUser.java @@ -162,7 +162,8 @@ public class LoginUser implements User { final User other = (User) object; - return Objects.equals(this.getUserName(), other.getUserName()); + return ((Objects.equals(this.getUserName(), other.getUserName())) + && (Objects.equals(this.getUserId(), other.getUserId()))); } @Override @@ -249,6 +250,7 @@ public class LoginUser implements User { public int hashCode () { int hash = 5; hash = 83 * hash + Objects.hashCode(this.getUserName()); + hash = 87 * hash + Objects.hashCode(this.getUserId()); return hash; } } -- 2.39.5