X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2Fjava%2Forg%2Fmxchange%2Fjusercore%2Fmodel%2Fuser%2FAddressbookAdminUserSessionBean.java;h=54f3b754d1e14e5ec5178d7ba7d5b6d247106071;hb=185638885fce76129327c0228f1211a5dde23e45;hp=2bfda85ff5d68aeea4218f3fdbd2e25d1cbfcd6c;hpb=71f544e35953214914e5dfce601adb82cd43ae20;p=addressbook-mailer-ejb.git diff --git a/src/java/org/mxchange/jusercore/model/user/AddressbookAdminUserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/AddressbookAdminUserSessionBean.java index 2bfda85..54f3b75 100644 --- a/src/java/org/mxchange/jusercore/model/user/AddressbookAdminUserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/AddressbookAdminUserSessionBean.java @@ -187,15 +187,15 @@ public class AddressbookAdminUserSessionBean extends BaseAddressbookDatabaseBean } 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 AddressbookAdminUserSessionBean extends BaseAddressbookDatabaseBean } 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