From 2f3bbcb5b34f08761e42c4c940c913eba641fe22 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 23 Aug 2016 16:22:56 +0200 Subject: [PATCH] sorted order: first primary key, then other data --- src/org/mxchange/jcontacts/contact/UserContact.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/org/mxchange/jcontacts/contact/UserContact.java b/src/org/mxchange/jcontacts/contact/UserContact.java index 06109d7..4afd434 100644 --- a/src/org/mxchange/jcontacts/contact/UserContact.java +++ b/src/org/mxchange/jcontacts/contact/UserContact.java @@ -295,7 +295,9 @@ public class UserContact implements Contact { final Contact other = (Contact) object; - if (!Objects.equals(this.getContactCity(), other.getContactCity())) { + if (!Objects.equals(this.getContactId(), other.getContactId())) { + return false; + } else if (!Objects.equals(this.getContactCity(), other.getContactCity())) { return false; } else if (!Objects.equals(this.getContactEmailAddress(), other.getContactEmailAddress())) { return false; @@ -317,8 +319,6 @@ public class UserContact implements Contact { return false; } else if (!Objects.equals(this.getContactHouseNumberExtension(), other.getContactHouseNumberExtension())) { return false; - } else if (!Objects.equals(this.getContactId(), other.getContactId())) { - return false; } return true; -- 2.39.5