if (null == emailAddress) {
// Abort here
throw new NullPointerException("emailAddress is null"); //NOI18N
- } else if (emailAddress.getEmailChangeId() == null) {
- // Throw NPE again
- throw new NullPointerException("emailAddress.emailChangeId is null"); //NOI18N
- } else if (emailAddress.getEmailChangeId() < 1) {
- // Not valid
- throw new IllegalArgumentException(MessageFormat.format("emailAddress.emailChangeId={0} is not valid.", emailAddress.getEmailChangeId())); //NOI18N
} else if (!this.userBean.ifUserExists(emailAddress.getEmailChangeUser())) {
// User does not exist
throw new PersistenceException(MessageFormat.format("Email change with id {0} does not exist.", emailAddress.getEmailChangeId())); //NOI18N