diff options
author | Vitaly Takmazov | 2016-11-28 13:09:34 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-11-28 13:09:34 +0300 |
commit | 1679b35661297fd9a6693b03cadcdbc1ab5a4203 (patch) | |
tree | ec2457286fcf93f1c227da369c0c39c98aa853df /juick-server/src | |
parent | bc23d2d2125d2086847397e85335f29a70668f6b (diff) |
juick-api: all controllers are using spring-security and @RequestParam
Diffstat (limited to 'juick-server/src')
-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 |