]> git.mxchange.org Git - pizzaservice-ejb.git/commitdiff
changed some tests (please cherry-pick)
authorRoland Häder <roland@mxchange.org>
Thu, 11 Aug 2016 10:16:13 +0000 (12:16 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 16 Aug 2016 17:50:48 +0000 (19:50 +0200)
src/java/org/mxchange/jusercore/model/user/PizzaAdminUserSessionBean.java

index 0bdea2775bad144acbf1e57b5b0f09e9dfe8dc78..e93cae526aa044f0ebd5610ba72484314d32bf17 100644 (file)
@@ -187,15 +187,15 @@ public class PizzaAdminUserSessionBean extends BasePizzaDatabaseBean implements
                } else if (user.getUserAccountStatus() == null) {
                        // Throw NPE again
                        throw new NullPointerException("user.userAccountStatus is null"); //NOI18N
+               } else if (!this.userBean.ifUserExists(user)) {
+                       // Name already found
+                       throw new UserNotFoundException(user);
                } else if (user.getUserAccountStatus() == UserAccountStatus.LOCKED) {
                        // Account is locked
                        throw new UserStatusLockedException(user);
                } else if (user.getUserAccountStatus() == UserAccountStatus.UNCONFIRMED) {
-                       // Account is locked
+                       // Account is unconfirmed
                        throw new UserStatusUnconfirmedException(user);
-               } else if (!this.userBean.ifUserExists(user)) {
-                       // Name already found
-                       throw new UserNotFoundException(user);
                } else if (null == userLockReason) {
                        // Throw NPE again
                        throw new NullPointerException("userLockReason is null"); //NOI18N
@@ -277,15 +277,15 @@ public class PizzaAdminUserSessionBean extends BasePizzaDatabaseBean implements
                } else if (user.getUserAccountStatus() == null) {
                        // Throw NPE again
                        throw new NullPointerException("user.userAccountStatus is null"); //NOI18N
+               } else if (!this.userBean.ifUserExists(user)) {
+                       // Name already found
+                       throw new UserNotFoundException(user);
                } else if (user.getUserAccountStatus() == UserAccountStatus.CONFIRMED) {
-                       // Account is locked
+                       // Account is confirmed
                        throw new UserStatusConfirmedException(user);
                } else if (user.getUserAccountStatus() == UserAccountStatus.UNCONFIRMED) {
-                       // Account is locked
+                       // Account is unconfirmed
                        throw new UserStatusUnconfirmedException(user);
-               } else if (!this.userBean.ifUserExists(user)) {
-                       // Name already found
-                       throw new UserNotFoundException(user);
                }
 
                // Remove contact instance as this is not updated