]> git.mxchange.org Git - jcontacts-business-core.git/blobdiff - src/org/mxchange/jcontactsbusiness/model/branchoffice/BranchOffices.java
Continued:
[jcontacts-business-core.git] / src / org / mxchange / jcontactsbusiness / model / branchoffice / BranchOffices.java
index 706a3280efd8a0e47e30de6f36ed3a59a73de782..2742a5e268c7d3b47afcbbec447c4779de5f3e8c 100644 (file)
@@ -72,6 +72,9 @@ public class BranchOffices implements Serializable {
                } else if (null == targetBranchOffice) {
                        // Throw NPE
                        throw new NullPointerException("targetBranchOffice is null"); //NOI18N
+               } else if (Objects.equals(sourceBranchOffice, targetBranchOffice)) {
+                       // Throw IAE
+                       throw new IllegalArgumentException("sourceBranchOffice and targetBranchOffice are the same"); //NOI18N
                }
 
                // Copy all fields
@@ -80,8 +83,6 @@ public class BranchOffices implements Serializable {
                targetBranchOffice.setBranchContactEmployee(sourceBranchOffice.getBranchContactEmployee());
                targetBranchOffice.setBranchCountry(sourceBranchOffice.getBranchCountry());
                targetBranchOffice.setBranchEmailAddress(sourceBranchOffice.getBranchEmailAddress());
-               targetBranchOffice.setBranchEntryCreated(sourceBranchOffice.getBranchEntryCreated());
-               targetBranchOffice.setBranchEntryUpdated(sourceBranchOffice.getBranchEntryUpdated());
                targetBranchOffice.setBranchFaxNumber(sourceBranchOffice.getBranchFaxNumber());
                targetBranchOffice.setBranchHouseNumber(sourceBranchOffice.getBranchHouseNumber());
                targetBranchOffice.setBranchHouseNumberExtension(sourceBranchOffice.getBranchHouseNumberExtension());