]> git.mxchange.org Git - jjobs-mailer-ejb.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Thu, 25 Aug 2016 12:23:11 +0000 (14:23 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 9 Jun 2017 20:25:20 +0000 (22:25 +0200)
- 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 <roland@mxchange.org>
src/java/org/mxchange/jusercore/model/user/AddressbookAdminUserSessionBean.java

index fff962048d9f799a70beb424c94a7bf83d3ef68a..209d1a7259a67b21d59001baf424111758893802 100644 (file)
@@ -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
                }