]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Some fixes: (please cherry-pick)
authorRoland Haeder <roland@mxchange.org>
Sat, 6 Aug 2016 20:16:43 +0000 (22:16 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 6 Aug 2016 20:16:43 +0000 (22:16 +0200)
- added missing import for MessageFormat
- renamed loginController to userLoginController as this is only for user logins

src/java/org/mxchange/pizzaapplication/beans/email_address/PizzaEmailChangeWebSessionBean.java
src/java/org/mxchange/pizzaapplication/beans/login/PizzaUserLoginWebSessionBean.java

index 513473670b7fca31fc1c39a2ad2871e5b078971b..424bd0faa9f5af131a9d579d2c78ce3b438da2ab 100644 (file)
@@ -81,7 +81,7 @@ public class PizzaEmailChangeWebSessionBean extends BasePizzaController implemen
         * Login bean (controller)
         */
        @Inject
-       private PizzaUserLoginWebSessionController loginController;
+       private PizzaUserLoginWebSessionController userLoginController;
 
        /**
         * Default constructor
@@ -106,7 +106,7 @@ public class PizzaEmailChangeWebSessionBean extends BasePizzaController implemen
        @Override
        public String doChangeEmailAddress () {
                // This method shall only be called if the user is logged-in
-               if (!this.loginController.isUserLoggedIn()) {
+               if (!this.userLoginController.isUserLoggedIn()) {
                        // Not logged-in
                        throw new IllegalStateException("User is not logged-in"); //NOI18N
                } else if (!this.isRequiredChangeEmailAddressSet()) {
@@ -115,7 +115,7 @@ public class PizzaEmailChangeWebSessionBean extends BasePizzaController implemen
                } else if (!Objects.equals(this.getEmailAddress(), this.getEmailAddressRepeat())) {
                        // Email address 1+2 mismatch
                        throw new FaceletException("Email address 1/2 are mismatching."); //NOI18N
-               } else if (!this.loginController.ifCurrentPasswordMatches()) {
+               } else if (!this.userLoginController.ifCurrentPasswordMatches()) {
                        // Password not matching
                        this.showFacesMessage("form_login_change_email_address:currentPassword", new UserPasswordMismatchException(this.userLoginController.getLoggedInUser())); //NOI18N
                        return ""; //NOI18N
@@ -125,7 +125,7 @@ public class PizzaEmailChangeWebSessionBean extends BasePizzaController implemen
                }
 
                // Get user instance
-               User user = this.loginController.getLoggedInUser();
+               User user = this.userLoginController.getLoggedInUser();
 
                // It should be there, so run some tests on it
                assert (user instanceof User) : "Instance loginController.loggedInUser is null"; //NOI18N
index b202cb6f1d9ec95cd6759e88d6cbc0d28b244275..0996cc46be3cdfdb487bd78d3f30748bfcbc172c 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.pizzaapplication.beans.login;
 
+import java.text.MessageFormat;
 import java.util.Collections;
 import java.util.List;
 import java.util.Objects;