]> git.mxchange.org Git - jfinancials-ejb.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Sun, 10 Sep 2017 18:01:03 +0000 (20:01 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 10 Sep 2017 18:01:03 +0000 (20:01 +0200)
- added more 'final' where possible, it is fine here as they are local variables

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jcontacts/model/contact/FinancialsAdminContactSessionBean.java
src/java/org/mxchange/jfinancials/database/BaseFinancialsDatabaseBean.java

index 44519d3e7095aeb5622c46e54a95239edcac7e1b..d4939b7934605c8f01877998accdce0daf71b6b9 100644 (file)
@@ -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;
index eafb9e73a8808051839f8579a926aeb0b78ff37c..f594688a136d2dfdfd1a609d7ceab8f393a322fb 100644 (file)
@@ -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