From: Roland Haeder Date: Tue, 13 Oct 2015 07:54:01 +0000 (+0200) Subject: also include user id? X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9281dc5d4400ffc0afaa5fcd3dbbf7a83fbc5151;p=juser-login-core.git also include user id? Signed-off-by:Roland Häder --- 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; } }