From: Roland Häder Date: Tue, 26 Apr 2016 09:53:29 +0000 (+0200) Subject: Continued a bit: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=029e8aebdad0992f7646546c6c9f7fee9e4d62b8;p=pizzaservice-ejb.git Continued a bit: - added some more log messages - null > 0 is not allowed, need to check type too --- diff --git a/src/java/org/mxchange/jcontacts/contact/PizzaContactSessionBean.java b/src/java/org/mxchange/jcontacts/contact/PizzaContactSessionBean.java index 7cbf2c3..80fcb57 100644 --- a/src/java/org/mxchange/jcontacts/contact/PizzaContactSessionBean.java +++ b/src/java/org/mxchange/jcontacts/contact/PizzaContactSessionBean.java @@ -165,8 +165,14 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co // Get contact Contact next = iterator.next(); + // Debug message + this.getLoggerBeanLocal().logDebug(MessageFormat.format("isContactFound: next={0}", next)); //NOI18N + // Is same contact? if (ContactUtils.isSameContact(contact, next)) { + // Debug message + this.getLoggerBeanLocal().logDebug("isContactFound: Found same contact."); //NOI18N + // Found it isFound = true; break; diff --git a/src/java/org/mxchange/pizzaapplication/model/customer/PizzaAdminCustomerSessionBean.java b/src/java/org/mxchange/pizzaapplication/model/customer/PizzaAdminCustomerSessionBean.java index ba05158..149e230 100644 --- a/src/java/org/mxchange/pizzaapplication/model/customer/PizzaAdminCustomerSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/model/customer/PizzaAdminCustomerSessionBean.java @@ -64,7 +64,7 @@ public class PizzaAdminCustomerSessionBean extends BasePizzaDatabaseBean impleme if (null == customer) { // Throw NPE throw new NullPointerException("customer is null"); //NOI18N - } else if (customer.getCustomerId() > 0) { + } else if ((customer.getCustomerId() instanceof Long) && (customer.getCustomerId() > 0)) { // Not allowed throw new IllegalArgumentException(MessageFormat.format("customer.customerId={0} is not allowed here.", customer.getCustomerId())); //NOI18N } else if (customer.getCustomerContact() == null) {