]> git.mxchange.org Git - addressbook-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:05:03 +0000 (20:05 +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/addressbook/database/BaseAddressbookDatabaseBean.java
src/java/org/mxchange/jcontacts/model/contact/AddressbookAdminContactSessionBean.java

index e19d63d9cff7458c5fdd735b95ccb0e39b3a3926..7aa14e54e5e1b318f06c5ba47e9fc8dd4c3e66f6 100644 (file)
@@ -736,7 +736,7 @@ public abstract class BaseAddressbookDatabaseBean extends BaseDatabaseBean {
 
                try {
                        // Send out email change
-                       ObjectMessage message = this.getSession().createObjectMessage();
+                       final ObjectMessage message = this.getSession().createObjectMessage();
                        message.setObject(emailWrapper);
 
                        // Send message
index 82c88b49b474c8b3ead10f8bb41469306a13238e..94dacb5b9c72816f4e149f46970e66999cc00117 100644 (file)
@@ -100,7 +100,7 @@ public class AddressbookAdminContactSessionBean extends BaseAddressbookDatabaseB
                }
 
                // 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 AddressbookAdminContactSessionBean extends BaseAddressbookDatabaseB
                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 AddressbookAdminContactSessionBean extends BaseAddressbookDatabaseB
                // Try it
                try {
                        // Try to find instance
-                       Contact dummy = (Contact) query.getSingleResult();
+                       final Contact dummy = (Contact) query.getSingleResult();
 
                        // Mark as found
                        isFound = true;