From 5b7001d3e17b2b75d62c6f63d8d8265f74faf3a4 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Roland=20H=C3=A4der?= <roland@mxchange.org>
Date: Fri, 20 Jan 2023 03:38:01 +0100
Subject: [PATCH] Continued: - too many different ways, now they are the same

---
 .../model/utils/DepartmentUtils.java              | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

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