]> git.mxchange.org Git - jjobs-war.git/blobdiff - src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionBean.java
Please cherry-pick:
[jjobs-war.git] / src / java / org / mxchange / jjobs / beans / contact / JobsContactWebSessionBean.java
index e087f813b170adccf7f7d6c4a2d66a6e0c2975fa..1f4ee396cbd9bf4b003f005e64adac801e3eb1c0 100644 (file)
@@ -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);
                        }
                }