aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src')
-rw-r--r--juick-server/src/main/java/com/juick/service/UserServiceImpl.java7
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