]> git.mxchange.org Git - jcontacts-business-core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Fri, 20 Jan 2023 02:38:01 +0000 (03:38 +0100)
committerRoland Häder <roland@mxchange.org>
Fri, 20 Jan 2023 02:38:01 +0000 (03:38 +0100)
- too many different ways, now they are the same

src/org/mxchange/jcontactsbusiness/model/utils/DepartmentUtils.java

index f1c657fd5c5b85a46d749d163c96c05e7e19989f..ea48426a998dcc35fbbc452d2b0123b713a483d4 100644 (file)
@@ -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())));
        }
 
        /**