]> git.mxchange.org Git - juser-core.git/commitdiff
also include user id?
authorRoland Haeder <roland@mxchange.org>
Tue, 13 Oct 2015 07:54:01 +0000 (09:54 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 13 Oct 2015 07:54:01 +0000 (09:54 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/org/mxchange/jusercore/model/user/LoginUser.java

index 5e9cd65267123fa2edf7943a53c14e948086f23f..25950faa8991d754b63d16cbafbc331659f84780 100644 (file)
@@ -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;
        }
 }