From 04b7d6f405ae60379347dc09b79108b01ae27274 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 12 Jul 2017 19:53:16 +0200 Subject: [PATCH] the more usual way ... MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- src/org/mxchange/jusercore/model/user/LoginUser.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/org/mxchange/jusercore/model/user/LoginUser.java b/src/org/mxchange/jusercore/model/user/LoginUser.java index da5c925..e400dc4 100644 --- a/src/org/mxchange/jusercore/model/user/LoginUser.java +++ b/src/org/mxchange/jusercore/model/user/LoginUser.java @@ -184,8 +184,13 @@ public class LoginUser implements User { final User other = (User) object; - return ((Objects.equals(this.getUserName(), other.getUserName())) && - (Objects.equals(this.getUserId(), other.getUserId()))); + if (!Objects.equals(this.getUserName(), other.getUserName())) { + return false; + } else if (!Objects.equals(this.getUserId(), other.getUserId())) { + return false; + } + + return true; } @Override -- 2.39.5