aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/service
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-11-28 13:09:34 +0300
committerGravatar Vitaly Takmazov2016-11-28 13:09:34 +0300
commit1679b35661297fd9a6693b03cadcdbc1ab5a4203 (patch)
treeec2457286fcf93f1c227da369c0c39c98aa853df /juick-server/src/main/java/com/juick/service
parentbc23d2d2125d2086847397e85335f29a70668f6b (diff)
juick-api: all controllers are using spring-security and @RequestParam
Diffstat (limited to 'juick-server/src/main/java/com/juick/service')
-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