Community
Participate
Working Groups
java.lang.NullPointerException at org.eclipse.jetty.server.handler.HotSwapHandler.setHandler(HotSwapHandler.java:84) at org.eclipse.gyrex.http.jetty.internal.app.UrlToApplicationHandler$ApplicationDelegator.handle(UrlToApplicationHandler.java:53) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:932) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:870) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:214) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113) at org.eclipse.jetty.server.Server.handle(Server.java:333) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:595) at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1038) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:549) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:211) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:424) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:489) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436) at java.lang.Thread.run(Thread.java:619) old_handler maybe null in that case if not set before but already started. Workaround is to set a handler first before starting.
> svn commit -m "Bug 322575 resolve potential NPE in hot swap handler if old handler was null. added a null check since existing doStart and doStop methods specifically handle cases where wrapped handler is null on start/stop" VERSION.txt jetty-server/src/main/java/org/eclipse/jetty/server/handler/HotSwapHandler.java Committed revision 2216.
Sweet. That was fast. :)