]> git.mxchange.org Git - jjobs-ejb.git/commitdiff
updated code logic to latest changes
authorRoland Häder <roland@mxchange.org>
Tue, 26 Apr 2016 11:11:35 +0000 (13:11 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 29 Apr 2016 19:31:56 +0000 (21:31 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jcontacts/contact/JobsContactSessionBean.java

index 2c4e53cdb4f9492ba20129553e3df1284cd04704..2ba4270b254bf7ab1feae5260f180514820831ad 100644 (file)
@@ -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;
        }