From b080ab7d61c274d2a3ed2ee84f70fa2b75970c40 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 19 Mar 2018 23:03:36 +0100 Subject: [PATCH] Continued: - Objects.equals() is an overdose here, as a possible null-reference has already been checked before - fixed copyright notice MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../events/user/created/ObservableCreatedUserEvent.java | 2 +- src/org/mxchange/jusercore/model/user/LoginUser.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/mxchange/jusercore/events/user/created/ObservableCreatedUserEvent.java b/src/org/mxchange/jusercore/events/user/created/ObservableCreatedUserEvent.java index d7129d5..dcbd8fd 100644 --- a/src/org/mxchange/jusercore/events/user/created/ObservableCreatedUserEvent.java +++ b/src/org/mxchange/jusercore/events/user/created/ObservableCreatedUserEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017, 2018 Free Software Foundation + * Copyright (C) 2017, 2018 Free Software Foundation * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/org/mxchange/jusercore/model/user/LoginUser.java b/src/org/mxchange/jusercore/model/user/LoginUser.java index 9f6709d..1e714a2 100644 --- a/src/org/mxchange/jusercore/model/user/LoginUser.java +++ b/src/org/mxchange/jusercore/model/user/LoginUser.java @@ -226,7 +226,7 @@ public class LoginUser implements User { if (null == user) { // Should not happen throw new NullPointerException("user is null"); //NOI18N - } else if (Objects.equals(this, user)) { + } else if (user.equals(this)) { // Same object return 0; } -- 2.39.5