diff options
Diffstat (limited to 'juick-server/src/main/java/com/juick/service')
-rw-r--r-- | juick-server/src/main/java/com/juick/service/UserServiceImpl.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/juick-server/src/main/java/com/juick/service/UserServiceImpl.java b/juick-server/src/main/java/com/juick/service/UserServiceImpl.java index a00eab3f..b3430254 100644 --- a/juick-server/src/main/java/com/juick/service/UserServiceImpl.java +++ b/juick-server/src/main/java/com/juick/service/UserServiceImpl.java @@ -118,16 +118,15 @@ public class UserServiceImpl extends BaseJdbcService implements UserService { @Transactional(readOnly = true) @Override public User getUserByName(final String username) { - User result = null; - if (StringUtils.isNotBlank(username)) { List<User> list = getJdbcTemplate().query( "SELECT id, nick, banned, lang FROM users WHERE nick = ?", new UserMapper(), username); if (!list.isEmpty()) - result = list.get(0); + return list.get(0); } - return result; + // TODO: @NonNullable ? + return new User(); } @Override |