NPE on Jetty when closing tab with @Push(transport = Transport.WEBSOCKET_XH

Good day, I am playing with Vaadin 7.6.4 and Kotlin. I have successfully enabled @Push annotation and it is working properly, there is just a NPE exception logged when the browser tab is closed:

Apr 15, 2016 9:08:02 AM org.atmosphere.cpr.AtmosphereResourceImpl notifyListeners
WARNING: Listener error {}
java.lang.NullPointerException
    at org.eclipse.jetty.server.Request.extractQueryParameters(Request.java:371)
    at org.eclipse.jetty.server.Request.restoreParameters(Request.java:1044)
    at org.eclipse.jetty.server.Request.getParameter(Request.java:991)
    at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:194)
    at org.atmosphere.cpr.AtmosphereRequest.getParameter(AtmosphereRequest.java:456)
    at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:194)
    at com.vaadin.server.VaadinService.hasParameter(VaadinService.java:740)
    at com.vaadin.server.VaadinService.doFindOrCreateVaadinSession(VaadinService.java:702)
    at com.vaadin.server.VaadinService.findOrCreateVaadinSession(VaadinService.java:668)
    at com.vaadin.server.VaadinService.findVaadinSession(VaadinService.java:527)
    at com.vaadin.server.communication.PushHandler.connectionLost(PushHandler.java:327)
    at com.vaadin.server.communication.PushAtmosphereHandler$AtmosphereResourceListener.onThrowable(PushAtmosphereHandler.java:117)
    at org.atmosphere.cpr.AtmosphereResourceImpl.onThrowable(AtmosphereResourceImpl.java:667)
    at org.atmosphere.cpr.AtmosphereResourceImpl.notifyListeners(AtmosphereResourceImpl.java:648)
    at org.atmosphere.cpr.AtmosphereResourceImpl.notifyListeners(AtmosphereResourceImpl.java:597)
    at org.atmosphere.cpr.AsynchronousProcessor.completeLifecycle(AsynchronousProcessor.java:465)
    at org.atmosphere.interceptor.OnDisconnectInterceptor.inspect(OnDisconnectInterceptor.java:77)
    at org.atmosphere.cpr.AsynchronousProcessor.invokeInterceptors(AsynchronousProcessor.java:312)
    at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:169)
    at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:107)
    at org.atmosphere.container.Servlet30CometSupport.service(Servlet30CometSupport.java:66)
    at org.atmosphere.container.Jetty9AsyncSupportWithWebSocket.service(Jetty9AsyncSupportWithWebSocket.java:170)
    at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2075)
    at com.vaadin.server.communication.PushRequestHandler.handleRequest(PushRequestHandler.java:247)
    at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1409)
    at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:364)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689)
    at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:225)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1160)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1092)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
    at org.eclipse.jetty.server.Server.handle(Server.java:518)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:244)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
    at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:246)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:156)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
    at java.lang.Thread.run(Thread.java:745)

The exception does not seem to affect the app functionality in any way, so perhaps it’s okay :wink: Also, this may be a bug in Jetty itself. I’ll try with Tomcat and I’ll let you know.
The test project is a very simple Gradle-based app located here:
https://github.com/mvysny/pokusy_kotlinee
- just build the app simply by running ./gradlew, then grab the WAR from build/libs and run it with the Jetty Runner jar

Running on Tomcat does not produce the abovementioned NPE, so this is probably a bug in Jetty.

Ah, I’m blind:
https://vaadin.com/forum#!/thread/10309898