From b50b791444446de97ef229fdf67124b1a48c719e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 12 Nov 2017 23:03:02 +0100 Subject: [PATCH] Continued: - also compare company name as 2 companies may be headed in same building MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../jcontactsbusiness/model/headquarter/Headquarters.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/org/mxchange/jcontactsbusiness/model/headquarter/Headquarters.java b/src/org/mxchange/jcontactsbusiness/model/headquarter/Headquarters.java index e9ade40..9f7d03a 100644 --- a/src/org/mxchange/jcontactsbusiness/model/headquarter/Headquarters.java +++ b/src/org/mxchange/jcontactsbusiness/model/headquarter/Headquarters.java @@ -56,7 +56,10 @@ public class Headquarters implements Serializable { boolean isSameAddress = true; // Compare both addresses - if (!Objects.equals(headquarter1.getHeadquarterCountry(), headquarter2.getHeadquarterCountry())) { + if (!Objects.equals(headquarter1.getHeadquarterCompanyName(), headquarter2.getHeadquarterCompanyName())) { + // Not the same + isSameAddress = false; + } else if (!Objects.equals(headquarter1.getHeadquarterCountry(), headquarter2.getHeadquarterCountry())) { // Not the same isSameAddress = false; } else if (!Objects.equals(headquarter1.getHeadquarterCity(), headquarter2.getHeadquarterCity())) { -- 2.39.5