aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/main/java/com/vaadin
diff options
context:
space:
mode:
authorKnoobie <Knoobie@gmx.de>2017-04-13 09:22:07 +0200
committerIlia Motornyi <elmot@vaadin.com>2017-04-13 09:22:07 +0200
commit60a6e0282e8e013acb56821f30573c65f1a6c36d (patch)
treec3238f5c132e466477248d449132b602540605ff /server/src/main/java/com/vaadin
parent8a6853c8f5b4c21b0baf854e95431fa5b812904b (diff)
downloadvaadin-framework-60a6e0282e8e013acb56821f30573c65f1a6c36d.tar.gz
vaadin-framework-60a6e0282e8e013acb56821f30573c65f1a6c36d.zip
Check for NullPointer to remove exception spam
Diffstat (limited to 'server/src/main/java/com/vaadin')
-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;