]> git.mxchange.org Git - pizzaservice-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:02:26 +0000 (20:02 +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/PizzaAdminContactSessionBean.java
src/java/org/mxchange/pizzaaplication/database/BasePizzaDatabaseBean.java

index 1ec93923cd45595bdd7a046a2161fb8a14b22f0f..2b8c12fa7b78601acd8691f33ce6be2bc8b667e9 100644 (file)
@@ -100,7 +100,7 @@ public class PizzaAdminContactSessionBean extends BasePizzaDatabaseBean implemen
                }
 
                // 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 PizzaAdminContactSessionBean extends BasePizzaDatabaseBean implemen
                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 PizzaAdminContactSessionBean extends BasePizzaDatabaseBean implemen
                // Try it
                try {
                        // Try to find instance
-                       Contact dummy = (Contact) query.getSingleResult();
+                       final Contact dummy = (Contact) query.getSingleResult();
 
                        // Mark as found
                        isFound = true;
index b45b7bf8c4950bd216bde3c283f484729ec499f1..3ae9d6292483beb58ad353f8646a378fb0b85874 100644 (file)
@@ -736,7 +736,7 @@ public abstract class BasePizzaDatabaseBean extends BaseDatabaseBean {
 
                try {
                        // Send out email change
-                       ObjectMessage message = this.getSession().createObjectMessage();
+                       final ObjectMessage message = this.getSession().createObjectMessage();
                        message.setObject(emailWrapper);
 
                        // Send message