]> git.mxchange.org Git - jfinancials-ejb.git/commitdiff
Maybe cherry-pick:
authorRoland Häder <roland@mxchange.org>
Sat, 9 Sep 2017 15:47:52 +0000 (17:47 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 9 Sep 2017 15:47:52 +0000 (17:47 +0200)
- removed unused imports as the EJB is now in same package
- prevented possible NPE on checking contact.getContactId() < 1

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jcontacts/model/contact/FinancialsAdminContactSessionBean.java
src/java/org/mxchange/jcontacts/model/contact/FinancialsContactSessionBean.java
src/java/org/mxchange/jcontacts/model/phone/FinancialsAdminContactPhoneSessionBean.java
src/java/org/mxchange/jcontactsbusiness/model/basicdata/FinancialsAdminBusinessDataSessionBean.java
src/java/org/mxchange/jcontactsbusiness/model/basicdata/FinancialsBusinessDataSessionBean.java
src/java/org/mxchange/jcontactsbusiness/model/branchoffice/FinancialsBranchOfficeSessionBean.java
src/java/org/mxchange/jcontactsbusiness/model/employee/FinancialsCompanyEmployeeSessionBean.java
src/java/org/mxchange/jcountry/model/data/FinancialsCountrySingletonBean.java
src/java/org/mxchange/jphone/model/phonenumbers/mobileprovider/FinancialsAdminMobileProviderSessionBean.java

index 2cef89fbb04fb02b120005af5acc9030061aba0b..44519d3e7095aeb5622c46e54a95239edcac7e1b 100644 (file)
@@ -16,8 +16,6 @@
  */
 package org.mxchange.jcontacts.model.contact;
 
-import org.mxchange.jcontacts.model.contact.AdminContactSessionBeanRemote;
-import org.mxchange.jcontacts.model.contact.Contact;
 import java.text.MessageFormat;
 import java.util.GregorianCalendar;
 import javax.ejb.Stateless;
index e55a2db169d7c9dd89564d0ccd64cd8ba452972d..e0aefaea11bd74097023161d3d7267e71892b076 100644 (file)
  */
 package org.mxchange.jcontacts.model.contact;
 
-import org.mxchange.jcontacts.model.contact.ContactSessionBeanRemote;
-import org.mxchange.jcontacts.model.contact.UserContact;
-import org.mxchange.jcontacts.model.contact.Contact;
-import org.mxchange.jcontacts.model.contact.ContactUtils;
 import java.text.MessageFormat;
 import java.util.Iterator;
 import java.util.List;
@@ -221,7 +217,7 @@ public class FinancialsContactSessionBean extends BaseFinancialsDatabaseBean imp
                if (null == contact) {
                        // Throw NPE
                        throw new NullPointerException("contact is null"); //NOI18N
-               } else if (contact.getContactId() > 0) {
+               } else if ((contact.getContactId() instanceof Long) && (contact.getContactId() > 0)) {
                        try {
                                // Id set, ask other method
                                return this.findContactById(contact.getContactId());
index 9e0e2bde6381f063cfc9c59f6ff5c5603cf83ced..432bcb8315c0fbed748a606a1ee6556f08fea1be 100644 (file)
@@ -23,7 +23,6 @@ import javax.ejb.EJB;
 import javax.ejb.Stateless;
 import org.mxchange.jcontacts.model.contact.Contact;
 import org.mxchange.jcontacts.model.contact.ContactSessionBeanRemote;
-import org.mxchange.jcontacts.model.phone.AdminContactsPhoneSessionBeanRemote;
 import org.mxchange.jfinancials.database.BaseFinancialsDatabaseBean;
 import org.mxchange.jphone.exceptions.PhoneNumberAlreadyLinkedException;
 import org.mxchange.jphone.exceptions.PhoneNumberNotLinkedException;
index af36f7014eb2d8c4a594039b25f5084695c0934f..ed3dc33c59cca71e1a257f8833eddc41e286b858 100644 (file)
@@ -16,7 +16,6 @@
  */
 package org.mxchange.jcontactsbusiness.model.basicdata;
 
-import org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData;
 import java.text.MessageFormat;
 import java.util.GregorianCalendar;
 import java.util.List;
@@ -25,8 +24,8 @@ import javax.ejb.EJB;
 import javax.ejb.Stateless;
 import org.mxchange.jcontactsbusiness.basicdata.AdminBusinessDataSessionBeanRemote;
 import org.mxchange.jcontactsbusiness.basicdata.BusinessDataSessionBeanRemote;
-import org.mxchange.jcontactsbusiness.model.employee.Employee;
 import org.mxchange.jcontactsbusiness.exceptions.basicdata.BusinessDataAlreadyAddedException;
+import org.mxchange.jcontactsbusiness.model.employee.Employee;
 import org.mxchange.jfinancials.database.BaseFinancialsDatabaseBean;
 import org.mxchange.jusercore.model.user.User;
 
index 5a9ec79af62a75cc600d2ada0d8b00a6bcdd7d94..3ee18afe50d45f51a1e2f6ea99030368fa4e47f5 100644 (file)
@@ -16,8 +16,6 @@
  */
 package org.mxchange.jcontactsbusiness.model.basicdata;
 
-import org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData;
-import org.mxchange.jcontactsbusiness.model.basicdata.CompanyBasicData;
 import java.text.MessageFormat;
 import java.util.List;
 import java.util.Objects;
index 600bae5e269d577c849717d48a898a059c099363..2c4ab7fd2179c86314dc82c4588f2b206f200ff1 100644 (file)
@@ -16,7 +16,6 @@
  */
 package org.mxchange.jcontactsbusiness.model.branchoffice;
 
-import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
 import java.text.MessageFormat;
 import java.util.List;
 import javax.ejb.Stateless;
index 344dcf7fdfd6954d724c7479e31fcd59f278aa71..832d87fee01a492d2c53eba75191555bc2824534 100644 (file)
@@ -16,7 +16,6 @@
  */
 package org.mxchange.jcontactsbusiness.model.employee;
 
-import org.mxchange.jcontactsbusiness.model.employee.Employee;
 import java.text.MessageFormat;
 import java.util.List;
 import javax.ejb.Stateless;
index bcdfe50c6025608920cac6395a5b325295d2ffd1..7b15935545ec928d2b1253f37a991b3627519abf 100644 (file)
@@ -16,9 +16,6 @@
 */
 package org.mxchange.jcountry.model.data;
 
-import org.mxchange.jcountry.model.data.CountrySingletonBeanRemote;
-import org.mxchange.jcountry.model.data.CountryData;
-import org.mxchange.jcountry.model.data.Country;
 import java.text.MessageFormat;
 import java.util.GregorianCalendar;
 import java.util.List;
index d01f1748517fda5a76c5aaacc04ef1a8da0180b2..6d8fdc63315918300da2aedcb67547e41e6a2b47 100644 (file)
@@ -21,8 +21,6 @@ import java.util.GregorianCalendar;
 import javax.ejb.Stateless;
 import org.mxchange.jfinancials.database.BaseFinancialsDatabaseBean;
 import org.mxchange.jphone.exceptions.MobileProviderAlreadyAddedException;
-import org.mxchange.jphone.model.phonenumbers.mobileprovider.AdminMobileProviderSessionBeanRemote;
-import org.mxchange.jphone.model.phonenumbers.mobileprovider.MobileProvider;
 
 /**
  * An administrative singleton EJB for mobile provider informations