X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2Fjava%2Forg%2Fmxchange%2Fjjobs%2Fbeans%2Fcontact%2FJobsContactWebSessionBean.java;h=1f4ee396cbd9bf4b003f005e64adac801e3eb1c0;hb=cdf549164977348b00cabc2c4d776db1113a94b9;hp=e087f813b170adccf7f7d6c4a2d66a6e0c2975fa;hpb=a05307951035afa92eda8a8ad91848b126a9982f;p=jjobs-war.git diff --git a/src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionBean.java b/src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionBean.java index e087f813..1f4ee396 100644 --- a/src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionBean.java +++ b/src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionBean.java @@ -1231,13 +1231,13 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job // Is it valid? if (null == faxNumber) { // Throw NPE - throw new NullPointerException("faxNumber is null"); + throw new NullPointerException("faxNumber is null"); //NOI18N } else if (faxNumber.getPhoneId() == null) { // Throw NPE again - throw new NullPointerException("faxNumber.phoneId is null"); + throw new NullPointerException("faxNumber.phoneId is null"); //NOI18N } else if (faxNumber.getPhoneId() < 1) { // Throw NPE again - throw new NullPointerException(MessageFormat.format("faxNumber.phoneId={0} is not valid", faxNumber.getPhoneId())); + throw new NullPointerException(MessageFormat.format("faxNumber.phoneId={0} is not valid", faxNumber.getPhoneId())); //NOI18N } // Loop through all contacts @@ -1259,13 +1259,13 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job // Is it valid? if (null == landLineNumber) { // Throw NPE - throw new NullPointerException("landLineNumber is null"); + throw new NullPointerException("landLineNumber is null"); //NOI18N } else if (landLineNumber.getPhoneId() == null) { // Throw NPE again - throw new NullPointerException("landLineNumber.phoneId is null"); + throw new NullPointerException("landLineNumber.phoneId is null"); //NOI18N } else if (landLineNumber.getPhoneId() < 1) { // Throw NPE again - throw new NullPointerException(MessageFormat.format("landLineNumber.phoneId={0} is not valid", landLineNumber.getPhoneId())); + throw new NullPointerException(MessageFormat.format("landLineNumber.phoneId={0} is not valid", landLineNumber.getPhoneId())); //NOI18N } // Loop through all contacts @@ -1284,23 +1284,32 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job * @param mobileNumber Mobile number to remove */ private void removeFromContacts (final DialableMobileNumber mobileNumber) { + // Log message + System.out.println(MessageFormat.format("{0}.removeFromContacts: CALLED!", this.getClass().getSimpleName())); //NOI18N + // Is it valid? if (null == mobileNumber) { // Throw NPE - throw new NullPointerException("mobileNumber is null"); + throw new NullPointerException("mobileNumber is null"); //NOI18N } else if (mobileNumber.getPhoneId() == null) { // Throw NPE again - throw new NullPointerException("mobileNumber.phoneId is null"); + throw new NullPointerException("mobileNumber.phoneId is null"); //NOI18N } else if (mobileNumber.getPhoneId() < 1) { // Throw NPE again - throw new NullPointerException(MessageFormat.format("mobileNumber.phoneId={0} is not valid", mobileNumber.getPhoneId())); + throw new NullPointerException(MessageFormat.format("mobileNumber.phoneId={0} is not valid", mobileNumber.getPhoneId())); //NOI18N } // Loop through all contacts for (final Contact contact : this.contacts) { + // Log message + System.out.println(MessageFormat.format("{0}.removeFromContacts: contact={1}", this.getClass().getSimpleName(), contact)); //NOI18N + // Is the number set? if (Objects.equals(contact.getContactMobileNumber(), mobileNumber)) { - // Found it + // Log message + System.out.println(MessageFormat.format("{0}.removeFromContacts: Unsetting ...", this.getClass().getSimpleName())); //NOI18N + + // Unset it contact.setContactMobileNumber(null); } }