diff options
author | Vitaly Takmazov | 2016-11-10 08:08:50 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-11-10 08:08:50 +0300 |
commit | 4a140f0a7ea988c2be47186c23a9f750f9ba597d (patch) | |
tree | bd34d0ab49286945b3ec83c6b44d1347b054cd6b /juick-api/src/main/java/com/juick | |
parent | e3ec404a47be5ac03493481301e45cebadb25f22 (diff) |
api: fix NPE
Diffstat (limited to 'juick-api/src/main/java/com/juick')
-rw-r--r-- | juick-api/src/main/java/com/juick/api/Notifications.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/juick-api/src/main/java/com/juick/api/Notifications.java b/juick-api/src/main/java/com/juick/api/Notifications.java index 2c846d6ff..bec365baa 100644 --- a/juick-api/src/main/java/com/juick/api/Notifications.java +++ b/juick-api/src/main/java/com/juick/api/Notifications.java @@ -29,7 +29,7 @@ public class Notifications { public void doGet(HttpServletRequest request, HttpServletResponse response, int vuid) throws IOException { User visitor = UserQueries.getUserByUID(jdbc, vuid).orElse(new User()); - if ((visitor.getUID() == 0) && !(visitor.getUName().equals("juick"))) { + if ((visitor.getUID() == 0) || !(visitor.getUName().equals("juick"))) { response.sendError(403); return; } |