aboutsummaryrefslogtreecommitdiff
path: root/juick-server-web/src/main/java/com/juick
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server-web/src/main/java/com/juick')
-rw-r--r--juick-server-web/src/main/java/com/juick/server/util/UserUtils.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/juick-server-web/src/main/java/com/juick/server/util/UserUtils.java b/juick-server-web/src/main/java/com/juick/server/util/UserUtils.java
index e6dc5fa2..ab5c320b 100644
--- a/juick-server-web/src/main/java/com/juick/server/util/UserUtils.java
+++ b/juick-server-web/src/main/java/com/juick/server/util/UserUtils.java
@@ -20,6 +20,7 @@ package com.juick.server.util;
import com.juick.User;
import com.juick.server.helpers.AnonymousUser;
import com.juick.service.security.entities.JuickUser;
+import javax.annotation.Nonnull;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
@@ -39,6 +40,7 @@ public class UserUtils {
return authentication == null ? null : authentication.getPrincipal();
}
+ @Nonnull
public static User getCurrentUser() {
Object principal = getPrincipal(getAuthentication());