From: Roland Häder Date: Mon, 19 Mar 2018 21:52:57 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8f18ddc95e2af090d4fc4727732afda5cf38789e;p=jaddressbook-share-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/jaddressbookshare/model/addressbook/shared/AddressbookShare.java b/src/org/mxchange/jaddressbookshare/model/addressbook/shared/AddressbookShare.java index 22b80bb..d483d39 100644 --- a/src/org/mxchange/jaddressbookshare/model/addressbook/shared/AddressbookShare.java +++ b/src/org/mxchange/jaddressbookshare/model/addressbook/shared/AddressbookShare.java @@ -159,7 +159,7 @@ public class AddressbookShare implements ShareableAddressbook { if (null == shareableAddressbook) { // Should not happen throw new NullPointerException("shareableAddressbook is null"); //NOI18N - } else if (Objects.equals(this, shareableAddressbook)) { + } else if (shareableAddressbook.equals(this)) { // Same object return 0; }