Signed-off-by: Roland Häder <roland@mxchange.org>
@Override
public User lookupUserById (final Long userId) throws UserNotFoundException {
@Override
public User lookupUserById (final Long userId) throws UserNotFoundException {
+ if (null == userId) {
+ // Throw NPE
+ throw new NullPointerException("userId is null"); //NOI18N
+ } else if (userId < 1) {
+ // Not valid
+ throw new IllegalArgumentException(MessageFormat.format("userId={0} is not valid.", userId)); //NOI18N
+ }
+
// Init variable
User user = null;
// Init variable
User user = null;