From c29b94e2f94c598644658ac57cd91ad91160a405 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 21 Apr 2016 14:39:22 +0200 Subject: [PATCH] check on user instance --- src/org/mxchange/jcontacts/contact/UserContact.java | 6 ++++++ 1 file changed, 6 insertions(+) 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()); -- 2.39.5