]> git.mxchange.org Git - jjobs-mailer-ejb.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Sat, 10 Jun 2017 19:51:54 +0000 (21:51 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 10 Jun 2017 19:57:16 +0000 (21:57 +0200)
- no gender, there is "personal title" for Mr./Mrs.

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jusercore/model/user/AddressbookUserSessionBean.java

index ff8b1e3936ddcdcae7baff1d634b48537cf6741d..3ab279d5b554d82f32ae82eb7cb32409328f03c4 100644 (file)
@@ -613,6 +613,18 @@ public class AddressbookUserSessionBean extends BaseAddressbookDatabaseBean impl
                        // Not valid
                        throw new IllegalArgumentException(MessageFormat.format("user.userId={0} is not valid", user.getUserId())); //NOI18N
                } else if (user.getUserAccountStatus() == null) {
+                       // Throw NPE
+                       throw new NullPointerException("user.userAccountStatus is null"); //NOI18N
+               } else if (user.getUserContact() == null) {
+                       // Throw it again
+                       throw new NullPointerException("user.userContact is null"); //NOI18N
+               } else if (user.getUserContact().getContactId() == null) {
+                       // .. and again
+                       throw new NullPointerException("user.userContact.contactId is null"); //NOI18N
+               } else if (user.getUserContact().getContactId() < 1) {
+                       // Invalid id
+                       throw new IllegalArgumentException(MessageFormat.format("user.userContact.contactId={0} is invalid", user.getUserContact().getContactId())); //NOI18N
+               } else if (user.getUserContact().getContactPersonalTitle() == null) {
                        // Throw NPE again
                        throw new NullPointerException("user.userAccountStatus is null"); //NOI18N
                } else if (!this.ifUserExists(user)) {