From: Roland Häder Date: Thu, 21 Apr 2016 12:39:22 +0000 (+0200) Subject: check on user instance X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c29b94e2f94c598644658ac57cd91ad91160a405;p=jcontacts-core.git check on user instance --- diff --git a/src/org/mxchange/jcontacts/contact/UserContact.java b/src/org/mxchange/jcontacts/contact/UserContact.java index 0f4beec..b176ccf 100644 --- a/src/org/mxchange/jcontacts/contact/UserContact.java +++ b/src/org/mxchange/jcontacts/contact/UserContact.java @@ -248,6 +248,12 @@ public class UserContact implements Contact { @Override public void copyAll (final Contact contact) { + // Contact should be valid + if (null == contact) { + // Throw NPE + throw new NullPointerException("contact is null"); //NOI18N + } + // Copy all: // - base data this.setContactFirstName(contact.getContactFirstName());