From a71ae9c499412fbaf8363d6fbe261bb4de40ced9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 9 Sep 2017 17:47:52 +0200 Subject: [PATCH] Maybe cherry-pick: - removed unused imports as the EJB is now in same package - prevented possible NPE on checking contact.getContactId() < 1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../model/contact/FinancialsAdminContactSessionBean.java | 2 -- .../model/contact/FinancialsContactSessionBean.java | 6 +----- .../model/phone/FinancialsAdminContactPhoneSessionBean.java | 1 - .../basicdata/FinancialsAdminBusinessDataSessionBean.java | 3 +-- .../model/basicdata/FinancialsBusinessDataSessionBean.java | 2 -- .../branchoffice/FinancialsBranchOfficeSessionBean.java | 1 - .../employee/FinancialsCompanyEmployeeSessionBean.java | 1 - .../jcountry/model/data/FinancialsCountrySingletonBean.java | 3 --- .../FinancialsAdminMobileProviderSessionBean.java | 2 -- 9 files changed, 2 insertions(+), 19 deletions(-) diff --git a/src/java/org/mxchange/jcontacts/model/contact/FinancialsAdminContactSessionBean.java b/src/java/org/mxchange/jcontacts/model/contact/FinancialsAdminContactSessionBean.java index 2cef89f..44519d3 100644 --- a/src/java/org/mxchange/jcontacts/model/contact/FinancialsAdminContactSessionBean.java +++ b/src/java/org/mxchange/jcontacts/model/contact/FinancialsAdminContactSessionBean.java @@ -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; diff --git a/src/java/org/mxchange/jcontacts/model/contact/FinancialsContactSessionBean.java b/src/java/org/mxchange/jcontacts/model/contact/FinancialsContactSessionBean.java index e55a2db..e0aefae 100644 --- a/src/java/org/mxchange/jcontacts/model/contact/FinancialsContactSessionBean.java +++ b/src/java/org/mxchange/jcontacts/model/contact/FinancialsContactSessionBean.java @@ -16,10 +16,6 @@ */ 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()); diff --git a/src/java/org/mxchange/jcontacts/model/phone/FinancialsAdminContactPhoneSessionBean.java b/src/java/org/mxchange/jcontacts/model/phone/FinancialsAdminContactPhoneSessionBean.java index 9e0e2bd..432bcb8 100644 --- a/src/java/org/mxchange/jcontacts/model/phone/FinancialsAdminContactPhoneSessionBean.java +++ b/src/java/org/mxchange/jcontacts/model/phone/FinancialsAdminContactPhoneSessionBean.java @@ -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; diff --git a/src/java/org/mxchange/jcontactsbusiness/model/basicdata/FinancialsAdminBusinessDataSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/model/basicdata/FinancialsAdminBusinessDataSessionBean.java index af36f70..ed3dc33 100644 --- a/src/java/org/mxchange/jcontactsbusiness/model/basicdata/FinancialsAdminBusinessDataSessionBean.java +++ b/src/java/org/mxchange/jcontactsbusiness/model/basicdata/FinancialsAdminBusinessDataSessionBean.java @@ -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; diff --git a/src/java/org/mxchange/jcontactsbusiness/model/basicdata/FinancialsBusinessDataSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/model/basicdata/FinancialsBusinessDataSessionBean.java index 5a9ec79..3ee18af 100644 --- a/src/java/org/mxchange/jcontactsbusiness/model/basicdata/FinancialsBusinessDataSessionBean.java +++ b/src/java/org/mxchange/jcontactsbusiness/model/basicdata/FinancialsBusinessDataSessionBean.java @@ -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; diff --git a/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/FinancialsBranchOfficeSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/FinancialsBranchOfficeSessionBean.java index 600bae5..2c4ab7f 100644 --- a/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/FinancialsBranchOfficeSessionBean.java +++ b/src/java/org/mxchange/jcontactsbusiness/model/branchoffice/FinancialsBranchOfficeSessionBean.java @@ -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; diff --git a/src/java/org/mxchange/jcontactsbusiness/model/employee/FinancialsCompanyEmployeeSessionBean.java b/src/java/org/mxchange/jcontactsbusiness/model/employee/FinancialsCompanyEmployeeSessionBean.java index 344dcf7..832d87f 100644 --- a/src/java/org/mxchange/jcontactsbusiness/model/employee/FinancialsCompanyEmployeeSessionBean.java +++ b/src/java/org/mxchange/jcontactsbusiness/model/employee/FinancialsCompanyEmployeeSessionBean.java @@ -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; diff --git a/src/java/org/mxchange/jcountry/model/data/FinancialsCountrySingletonBean.java b/src/java/org/mxchange/jcountry/model/data/FinancialsCountrySingletonBean.java index bcdfe50..7b15935 100644 --- a/src/java/org/mxchange/jcountry/model/data/FinancialsCountrySingletonBean.java +++ b/src/java/org/mxchange/jcountry/model/data/FinancialsCountrySingletonBean.java @@ -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; diff --git a/src/java/org/mxchange/jphone/model/phonenumbers/mobileprovider/FinancialsAdminMobileProviderSessionBean.java b/src/java/org/mxchange/jphone/model/phonenumbers/mobileprovider/FinancialsAdminMobileProviderSessionBean.java index d01f174..6d8fdc6 100644 --- a/src/java/org/mxchange/jphone/model/phonenumbers/mobileprovider/FinancialsAdminMobileProviderSessionBean.java +++ b/src/java/org/mxchange/jphone/model/phonenumbers/mobileprovider/FinancialsAdminMobileProviderSessionBean.java @@ -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 -- 2.39.5