- added some more log messages
- null > 0 is not allowed, need to check type too
// 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;
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) {