From 81d47e21c11bcee0da067234c85d3fb78cdac5e9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 2 Oct 2022 16:28:47 +0200 Subject: [PATCH] Please cherry-pick: - first check id number, then address --- .../model/branchoffice/PizzaAdminBranchOfficeSessionBean.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/PizzaAdminBranchOfficeSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/PizzaAdminBranchOfficeSessionBean.java index 5b1cf4c..f5f1f44 100644 --- a/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/PizzaAdminBranchOfficeSessionBean.java +++ b/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/PizzaAdminBranchOfficeSessionBean.java @@ -19,6 +19,7 @@ package org.mxchange.jcontactsbusiness.model.branchoffice; import java.text.MessageFormat; import java.util.Date; import java.util.List; +import java.util.Objects; import javax.ejb.EJB; import javax.ejb.Stateless; import org.mxchange.jcontacts.model.contact.Contact; @@ -169,7 +170,7 @@ public class PizzaAdminBranchOfficeSessionBean extends BasePizzaEnterpriseBean i // Check all single addresses for (final BranchOffice bo : branchOffices) { // Is the same address found? - if (BranchOffices.isSameAddress(bo, branchOffice)) { + if (Objects.equals(bo.getBranchId(), branchOffice.getBranchId()) || BranchOffices.isSameAddress(bo, branchOffice)) { // Found one isFound = true; break; -- 2.39.5