From d78ef94cad7053ae5546cbd10f4a3341cea9893e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 10 Sep 2017 20:01:03 +0200 Subject: [PATCH] Please cherry-pick: - added more 'final' where possible, it is fine here as they are local variables MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../model/contact/FinancialsAdminContactSessionBean.java | 6 +++--- .../jfinancials/database/BaseFinancialsDatabaseBean.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/java/org/mxchange/jcontacts/model/contact/FinancialsAdminContactSessionBean.java b/src/java/org/mxchange/jcontacts/model/contact/FinancialsAdminContactSessionBean.java index 44519d3..d4939b7 100644 --- a/src/java/org/mxchange/jcontacts/model/contact/FinancialsAdminContactSessionBean.java +++ b/src/java/org/mxchange/jcontacts/model/contact/FinancialsAdminContactSessionBean.java @@ -100,7 +100,7 @@ public class FinancialsAdminContactSessionBean extends BaseFinancialsDatabaseBea } // 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 FinancialsAdminContactSessionBean extends BaseFinancialsDatabaseBea 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 FinancialsAdminContactSessionBean extends BaseFinancialsDatabaseBea // 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/jfinancials/database/BaseFinancialsDatabaseBean.java b/src/java/org/mxchange/jfinancials/database/BaseFinancialsDatabaseBean.java index eafb9e7..f594688 100644 --- a/src/java/org/mxchange/jfinancials/database/BaseFinancialsDatabaseBean.java +++ b/src/java/org/mxchange/jfinancials/database/BaseFinancialsDatabaseBean.java @@ -712,7 +712,7 @@ public abstract class BaseFinancialsDatabaseBean extends BaseDatabaseBean { try { // Send out email change - ObjectMessage message = this.getSession().createObjectMessage(); + final ObjectMessage message = this.getSession().createObjectMessage(); message.setObject(emailWrapper); // Send message -- 2.39.5