import java.text.MessageFormat;
import java.util.Iterator;
import java.util.List;
+import java.util.Objects;
import javax.ejb.Stateless;
import javax.persistence.NoResultException;
import javax.persistence.Query;
Contact next = iterator.next();
// Is same contact?
- if (ContactUtils.isSameContact(contact, next)) {
+ if ((Objects.equals(contact, next)) || (ContactUtils.isSameContact(contact, next))) {
+ // Debug message
+ this.getLoggerBeanLocal().logDebug(MessageFormat.format("isContactFound: Found same contact, id={0}", next.getContactId())); //NOI18N
+
// Found it
foundContact = next;
break;
}
}
+ // Trace message
+ this.getLoggerBeanLocal().logTrace(MessageFormat.format("isContactFound: foundContact={0} - EXIT!", foundContact)); //NOI18N
+
// Return found contact
return foundContact;
}