From: Roland Häder Date: Sun, 2 Oct 2022 14:28:47 +0000 (+0200) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=dcd434c540de63eac33237c2723d81f2c80517da;p=jfinancials-ejb.git Please cherry-pick: - first check id number, then address --- diff --git a/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/FinancialsAdminBranchOfficeSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/FinancialsAdminBranchOfficeSessionBean.java index a46debb..d20738a 100644 --- a/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/FinancialsAdminBranchOfficeSessionBean.java +++ b/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/FinancialsAdminBranchOfficeSessionBean.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; @@ -202,7 +203,7 @@ public class FinancialsAdminBranchOfficeSessionBean extends BaseFinancialsEnterp // 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;