}
// 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())));
}
/**