aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/service/UserServiceImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com/juick/service/UserServiceImpl.java')
-rw-r--r--juick-server/src/main/java/com/juick/service/UserServiceImpl.java3
1 files changed, 2 insertions, 1 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 077fb01d..bcdb7a13 100644
--- a/juick-server/src/main/java/com/juick/service/UserServiceImpl.java
+++ b/juick-server/src/main/java/com/juick/service/UserServiceImpl.java
@@ -33,6 +33,7 @@ import org.springframework.jdbc.support.KeyHolder;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
+import javax.annotation.Nonnull;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
@@ -126,6 +127,7 @@ public class UserServiceImpl extends BaseJdbcService implements UserService {
}
@Transactional(readOnly = true)
+ @Nonnull
@Override
public User getUserByName(final String username) {
if (StringUtils.isNotBlank(username)) {
@@ -135,7 +137,6 @@ public class UserServiceImpl extends BaseJdbcService implements UserService {
if (!list.isEmpty())
return list.get(0);
}
- // TODO: @NonNullable ?
return AnonymousUser.INSTANCE;
}