From 4a140f0a7ea988c2be47186c23a9f750f9ba597d Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 10 Nov 2016 08:08:50 +0300 Subject: api: fix NPE --- juick-api/src/main/java/com/juick/api/Notifications.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'juick-api/src/main/java/com') 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 2c846d6f..bec365ba 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; } -- cgit v1.2.3