From: Roland Häder Date: Sun, 10 Sep 2017 18:01:03 +0000 (+0200) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c7915d71a3755a9804b7b4eb7a2be3f64d58a00b;p=jjobs-ejb.git Please cherry-pick: - added more 'final' where possible, it is fine here as they are local variables Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/jcontacts/model/contact/JobsAdminContactSessionBean.java b/src/java/org/mxchange/jcontacts/model/contact/JobsAdminContactSessionBean.java index 5fd615b..190c84b 100644 --- a/src/java/org/mxchange/jcontacts/model/contact/JobsAdminContactSessionBean.java +++ b/src/java/org/mxchange/jcontacts/model/contact/JobsAdminContactSessionBean.java @@ -100,7 +100,7 @@ public class JobsAdminContactSessionBean extends BaseJobsDatabaseBean implements } // Merge it to get a managed entity back - Contact managedContact = this.getEntityManager().getReference(contact.getClass(), contact.getContactId()); + final Contact managedContact = this.getEntityManager().getReference(contact.getClass(), contact.getContactId()); // Remove it from database this.getEntityManager().remove(managedContact); @@ -121,7 +121,7 @@ public class JobsAdminContactSessionBean extends BaseJobsDatabaseBean implements this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isContactRegistered: contact={1} - CALLED!", this.getClass().getSimpleName(), contact)); //NOI18N // Create query - Query query = this.getEntityManager().createNamedQuery("SearchContact"); //NOI18N + final Query query = this.getEntityManager().createNamedQuery("SearchContact"); //NOI18N // Set parameter query.setParameter("contact", contact); //NOI18N @@ -133,7 +133,7 @@ public class JobsAdminContactSessionBean extends BaseJobsDatabaseBean implements // Try it try { // Try to find instance - Contact dummy = (Contact) query.getSingleResult(); + final Contact dummy = (Contact) query.getSingleResult(); // Mark as found isFound = true; diff --git a/src/java/org/mxchange/jjobs/database/BaseJobsDatabaseBean.java b/src/java/org/mxchange/jjobs/database/BaseJobsDatabaseBean.java index 5a06d18..5187f12 100644 --- a/src/java/org/mxchange/jjobs/database/BaseJobsDatabaseBean.java +++ b/src/java/org/mxchange/jjobs/database/BaseJobsDatabaseBean.java @@ -736,7 +736,7 @@ public abstract class BaseJobsDatabaseBean extends BaseDatabaseBean { try { // Send out email change - ObjectMessage message = this.getSession().createObjectMessage(); + final ObjectMessage message = this.getSession().createObjectMessage(); message.setObject(emailWrapper); // Send message