summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorKnoobie <knoobie@gmx.de>2017-04-13 10:22:07 +0300
committerTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2017-05-08 14:46:35 +0300
commitda2f288cfd3278c55bb9801705dfb5a2373d4cbd (patch)
tree97fffe150027c05153a78bf26f2abfb298837499 /server
parent6323caa319b9b81ce327caf55173cb0b3299d952 (diff)
downloadvaadin-framework-da2f288cfd3278c55bb9801705dfb5a2373d4cbd.tar.gz
vaadin-framework-da2f288cfd3278c55bb9801705dfb5a2373d4cbd.zip
Check for NullPointer to remove exception spam
Diffstat (limited to 'server')
-rw-r--r--server/src/main/java/com/vaadin/server/communication/PushHandler.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/server/src/main/java/com/vaadin/server/communication/PushHandler.java b/server/src/main/java/com/vaadin/server/communication/PushHandler.java
index 07b606c6e9..e65945d15c 100644
--- a/server/src/main/java/com/vaadin/server/communication/PushHandler.java
+++ b/server/src/main/java/com/vaadin/server/communication/PushHandler.java
@@ -308,8 +308,20 @@ public class PushHandler {
// We don't want to use callWithUi here, as it assumes there's a client
// request active and does requestStart and requestEnd among other
// things.
+ if(event == null){
+ getLogger().log(Level.SEVERE,
+ "Could not get event. This should never happen.");
+ return;
+ }
AtmosphereResource resource = event.getResource();
+
+ if(resource == null){
+ getLogger().log(Level.SEVERE,
+ "Could not get resource. This should never happen.");
+ return;
+ }
+
VaadinServletRequest vaadinRequest = new VaadinServletRequest(
resource.getRequest(), service);
VaadinSession session = null;