From: Roland Haeder Date: Fri, 18 Sep 2015 09:57:21 +0000 (+0200) Subject: check instance + used method is no longer there X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=561d8c0433dc2a6d9da7ff84926cc559037ad8cf;p=jfinancials-swing.git check instance + used method is no longer there Signed-off-by:Roland Häder --- diff --git a/src/org/mxchange/addressbook/manager/contact/AddressbookContactManager.java b/src/org/mxchange/addressbook/manager/contact/AddressbookContactManager.java index 65bdd97..c3067ca 100644 --- a/src/org/mxchange/addressbook/manager/contact/AddressbookContactManager.java +++ b/src/org/mxchange/addressbook/manager/contact/AddressbookContactManager.java @@ -130,6 +130,9 @@ public class AddressbookContactManager extends BaseManager implements Manageable if (null == contact) { // Abort here throw new NullPointerException("contact is null"); //NOI18N + } if (!(this.getClient() instanceof AddressbookClient)) { + // Cannot cast + throw new IllegalArgumentException(MessageFormat.format("this.getClient()={0} does not implement AddressbookClient", this.getClient())); //NOI18N } // Get and cast client instance diff --git a/src/org/mxchange/addressbook/model/contact/user/UserContact.java b/src/org/mxchange/addressbook/model/contact/user/UserContact.java index 8642ae1..3ac444e 100644 --- a/src/org/mxchange/addressbook/model/contact/user/UserContact.java +++ b/src/org/mxchange/addressbook/model/contact/user/UserContact.java @@ -62,6 +62,6 @@ public class UserContact extends BookContact implements Contact { * Default constructor, may only be used from database backend */ public UserContact () { - this.enableFlagOwnContact(); + this.setOwnContact(Boolean.TRUE); } }