]> git.mxchange.org Git - addressbook-lib.git/blobdiff - Addressbook/src/org/mxchange/addressbook/model/contact/ContactTableModel.java
Added a lot trace messages + sanity checks for null references and such things
[addressbook-lib.git] / Addressbook / src / org / mxchange / addressbook / model / contact / ContactTableModel.java
index ef125a037c52dc8c4641781baadaf2e42d1147b8..30307c69ef4142d68893ff5cf9135a8df978d863 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.addressbook.model.contact;
 
+import java.text.MessageFormat;
 import javax.swing.table.TableModel;
 import org.mxchange.addressbook.client.Client;
 import org.mxchange.addressbook.model.BaseModel;
@@ -36,6 +37,15 @@ public class ContactTableModel extends BaseModel implements TableModel {
                // Parent super constructor
                super();
 
+               // Trace message
+               this.getLogger().trace(MessageFormat.format("client={1} - CALLED!", client)); //NOI18N
+
+               // Client must not be null
+               if (client == null)  {
+                       // Abort here
+                       throw new NullPointerException("client is null"); //NOI18N
+               }
+
                // Set client
                this.setClient(client);
        }