- also compare company name as 2 companies may be headed in same building
Signed-off-by: Roland Häder <roland@mxchange.org>
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())) {