From: Roland Haeder Date: Sat, 6 Aug 2016 20:16:43 +0000 (+0200) Subject: Some fixes: (please cherry-pick) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=777087ac222b314b058776b35ddfead35ab2c68a;p=pizzaservice-war.git Some fixes: (please cherry-pick) - added missing import for MessageFormat - renamed loginController to userLoginController as this is only for user logins --- diff --git a/src/java/org/mxchange/pizzaapplication/beans/email_address/PizzaEmailChangeWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/email_address/PizzaEmailChangeWebSessionBean.java index 51347367..424bd0fa 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/email_address/PizzaEmailChangeWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/email_address/PizzaEmailChangeWebSessionBean.java @@ -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 diff --git a/src/java/org/mxchange/pizzaapplication/beans/login/PizzaUserLoginWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/login/PizzaUserLoginWebSessionBean.java index b202cb6f..0996cc46 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/login/PizzaUserLoginWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/login/PizzaUserLoginWebSessionBean.java @@ -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;