]> git.mxchange.org Git - jfinancials-ejb.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Sun, 2 Oct 2022 14:28:47 +0000 (16:28 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 2 Oct 2022 14:28:47 +0000 (16:28 +0200)
- first check id number, then address

src/java/org/mxchange/jcontactsbusiness/model/branchoffice/FinancialsAdminBranchOfficeSessionBean.java

index a46debbd731ae0482abbdae13ef714d2523d2c92..d20738a64f4e132650afe90b1a54b49e41f3efe5 100644 (file)
@@ -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;