From: Roland Häder Date: Thu, 25 Aug 2016 12:23:11 +0000 (+0200) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5948ffbcbf0ba10f1023262ec9eacddc8e740d3a;p=addressbook-ejb.git Please cherry-pick: - first the user instance must become managed, then persist log entry ... - better check for Long, and not != null test (very lazy) Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/jusercore/model/user/AddressbookAdminUserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/AddressbookAdminUserSessionBean.java index fff9620..209d1a7 100644 --- a/src/java/org/mxchange/jusercore/model/user/AddressbookAdminUserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/AddressbookAdminUserSessionBean.java @@ -75,7 +75,7 @@ public class AddressbookAdminUserSessionBean extends BaseAddressbookDatabaseBean if (null == user) { // Abort here throw new NullPointerException("user is null"); //NOI18N - } else if (user.getUserId() != null) { + } else if (user.getUserId() instanceof Long) { // Not allowed here throw new IllegalStateException(MessageFormat.format("user.userId must be null, is: {0}", user.getUserId())); //NOI18N }