- 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>
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
}