From: Roland Häder Date: Tue, 26 Apr 2016 11:11:35 +0000 (+0200) Subject: updated code logic to latest changes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e815fe97ef2f478448b9871e36704df53023914b;p=jjobs-ejb.git updated code logic to latest changes Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/jcontacts/contact/JobsContactSessionBean.java b/src/java/org/mxchange/jcontacts/contact/JobsContactSessionBean.java index 2c4e53c..2ba4270 100644 --- a/src/java/org/mxchange/jcontacts/contact/JobsContactSessionBean.java +++ b/src/java/org/mxchange/jcontacts/contact/JobsContactSessionBean.java @@ -19,6 +19,7 @@ package org.mxchange.jcontacts.contact; 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; @@ -172,13 +173,19 @@ public class JobsContactSessionBean extends BaseJobsDatabaseBean implements Cont 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; }