- if (this.contactController.getGender() == null) {
- // Throw NPE again
- throw new NullPointerException("contactController.gender is null"); //NOI18N
- } else if (this.contactController.getFirstName() == null) {
- // ... and again
- throw new NullPointerException("contactController.firstName is null"); //NOI18N //NOI18N
- } else if (this.contactController.getFirstName().isEmpty()) {
- // ... and again
- throw new IllegalArgumentException("contactController.firstName is empty"); //NOI18N
- } else if (this.adminContactController.getFamilyName() == null) {
- // ... and again
- throw new NullPointerException("contactController.familyName is null"); //NOI18N
- } else if (this.contactController.getFamilyName().isEmpty()) {
- // ... and again
- throw new IllegalArgumentException("contactController.familyName is empty"); //NOI18N //NOI18N
- } else if (this.contactController.getEmailAddress() == null) {
- // ... and again
- throw new NullPointerException("contactController.emailAddress is null"); //NOI18N
- } else if (this.adminContactController.getEmailAddress().isEmpty()) {
- // ... and again
- throw new IllegalArgumentException("contactController.emailAddress is empty"); //NOI18N //NOI18N
- } else if (this.contactController.getEmailAddressRepeat() == null) {
- // ... and again
- throw new NullPointerException("contactController.emailAddressRepeat is null");
- } else if (this.contactController.getEmailAddressRepeat().isEmpty()) {
- // ... and again
- throw new IllegalArgumentException("contactController.emailAddressRepeat is empty"); //NOI18N //NOI18N
- } else if (!Objects.equals(this.contactController.getEmailAddress(), this.contactController.getEmailAddressRepeat())) {
- // Is not same email address
- throw new IllegalArgumentException("Both entered email addresses don't match.");
- }