Browse Source

Check for NullPointer to remove exception spam

tags/8.1.0.alpha5
Knoobie 7 years ago
parent
commit
60a6e0282e

+ 12
- 0
server/src/main/java/com/vaadin/server/communication/PushHandler.java View File

// We don't want to use callWithUi here, as it assumes there's a client // We don't want to use callWithUi here, as it assumes there's a client
// request active and does requestStart and requestEnd among other // request active and does requestStart and requestEnd among other
// things. // things.
if(event == null){
getLogger().log(Level.SEVERE,
"Could not get event. This should never happen.");
return;
}


AtmosphereResource resource = event.getResource(); AtmosphereResource resource = event.getResource();

if(resource == null){
getLogger().log(Level.SEVERE,
"Could not get resource. This should never happen.");
return;
}

VaadinServletRequest vaadinRequest = new VaadinServletRequest( VaadinServletRequest vaadinRequest = new VaadinServletRequest(
resource.getRequest(), service); resource.getRequest(), service);
VaadinSession session = null; VaadinSession session = null;

Loading…
Cancel
Save