From: Roland Haeder Date: Wed, 13 Apr 2016 20:57:33 +0000 (+0200) Subject: Also check for null, if the form fields are not given X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=facfe8aa6003cf0ef58cf11802cf6438c8c8a766;p=pizzaservice-war.git Also check for null, if the form fields are not given --- diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebSessionBean.java index 4f33d844..418999e5 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebSessionBean.java @@ -316,7 +316,7 @@ public class PizzaAdminUserWebSessionBean implements PizzaAdminUserWebSessionCon } else if (this.userController.isEmailAddressRegistered(user)) { // Email address is already used throw new FaceletException(new EmailAddressAlreadyRegisteredException(user)); - } else if ((this.getUserPassword().isEmpty()) && (this.getUserPasswordRepeat().isEmpty())) { + } else if ((this.getUserPassword() == null && (this.getUserPasswordRepeat() == null)) || ((this.getUserPassword().isEmpty()) && (this.getUserPasswordRepeat().isEmpty()))) { // Empty password entered, then generate one password = UserUtils.createRandomPassword(PizzaUserWebSessionController.MINIMUM_PASSWORD_LENGTH); } else if (!this.isSamePasswordEntered()) {