// 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
// 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
* @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);
}
}