]> git.mxchange.org Git - pizzaservice-ejb.git/commitdiff
Continued a bit:
authorRoland Häder <roland@mxchange.org>
Tue, 26 Apr 2016 09:53:29 +0000 (11:53 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 27 Apr 2016 19:02:53 +0000 (21:02 +0200)
- added some more log messages
- null > 0 is not allowed, need to check type too

src/java/org/mxchange/jcontacts/contact/PizzaContactSessionBean.java
src/java/org/mxchange/pizzaapplication/model/customer/PizzaAdminCustomerSessionBean.java

index 7cbf2c3c5612fbbaedecccd0e8a0f8f4df18e3ee..80fcb578773832f686934514c1ac6122d559b030 100644 (file)
@@ -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;
index ba05158c00ec9fa576c355634ea9d4bb2df0ef7e..149e23076699c2d7eada0a688f8ad10b8f6bf16d 100644 (file)
@@ -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) {