From: Roland Häder Date: Mon, 19 Mar 2018 22:04:19 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d13a814b3c4b7b9c3706b918bcac0d762ce71de5;p=jcontacts-core.git Continued: - Objects.equals() is an overdose here, as a possible null-reference has already been checked before Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jcontacts/model/contact/UserContact.java b/src/org/mxchange/jcontacts/model/contact/UserContact.java index 0eac7be..b91e85d 100644 --- a/src/org/mxchange/jcontacts/model/contact/UserContact.java +++ b/src/org/mxchange/jcontacts/model/contact/UserContact.java @@ -248,7 +248,7 @@ public class UserContact implements Contact { if (null == contact) { // Should not happen throw new NullPointerException("contact is null"); //NOI18N - } else if (Objects.equals(this, contact)) { + } else if (contact.equals(this)) { // Same object return 0; }