From: Roland Häder Date: Fri, 20 Jan 2023 02:38:01 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5b7001d3e17b2b75d62c6f63d8d8265f74faf3a4;p=jcontacts-business-core.git Continued: - too many different ways, now they are the same --- diff --git a/src/org/mxchange/jcontactsbusiness/model/utils/DepartmentUtils.java b/src/org/mxchange/jcontactsbusiness/model/utils/DepartmentUtils.java index f1c657f..ea48426 100644 --- a/src/org/mxchange/jcontactsbusiness/model/utils/DepartmentUtils.java +++ b/src/org/mxchange/jcontactsbusiness/model/utils/DepartmentUtils.java @@ -143,15 +143,12 @@ public class DepartmentUtils implements Serializable { } // Same company and same name? - boolean isSame = ((Objects.equals(department1.getDepartmentCompany(), department2.getDepartmentCompany())) && - (((department1.getDepartmentBranchOffice() instanceof BranchOffice) && - (Objects.equals(department1.getDepartmentBranchOffice(), department2.getDepartmentBranchOffice()))) || - ((department1.getDepartmentHeadquarter() instanceof Headquarter) && - (Objects.equals(department1.getDepartmentHeadquarter(), department2.getDepartmentHeadquarter())))) && - (Objects.equals(department1.getDepartmentI18nKey(), department2.getDepartmentI18nKey()))); - - // Return it - return isSame; + return ((Objects.equals(department1.getDepartmentCompany(), department2.getDepartmentCompany())) && + (((department1.getDepartmentBranchOffice() instanceof BranchOffice) && + (Objects.equals(department1.getDepartmentBranchOffice(), department2.getDepartmentBranchOffice()))) || + ((department1.getDepartmentHeadquarter() instanceof Headquarter) && + (Objects.equals(department1.getDepartmentHeadquarter(), department2.getDepartmentHeadquarter())))) && + (Objects.equals(department1.getDepartmentI18nKey(), department2.getDepartmentI18nKey()))); } /**