]> git.mxchange.org Git - jfinancials-swing.git/commitdiff
check instance + used method is no longer there
authorRoland Haeder <roland@mxchange.org>
Fri, 18 Sep 2015 09:57:21 +0000 (11:57 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 18 Sep 2015 09:57:21 +0000 (11:57 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/org/mxchange/addressbook/manager/contact/AddressbookContactManager.java
src/org/mxchange/addressbook/model/contact/user/UserContact.java

index 65bdd970a945ee40b2212bfdcc1f3d5c354db4ff..c3067ca3d3152fc410743f5e94ed51e30d48fd2d 100644 (file)
@@ -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
index 8642ae115c532b55bd102efa264e18aa90160db7..3ac444e53efb43b7b12523f8facf27e1eda1a96a 100644 (file)
@@ -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);
        }
 }