Fixing null pointer on http monitor. #489
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Null pointer exception encountered while using proxy exposed by http monitor of SOAP-UI.
java.lang.NullPointerException at com.eviware.soapui.impl.wsdl.submit.AbstractMessageExchange.<init>(AbstractMessageExchange.java:33) at com.eviware.soapui.impl.wsdl.submit.AbstractWsdlMessageExchange.<init>(AbstractWsdlMessageExchange.java:36) at com.eviware.soapui.impl.wsdl.monitor.WsdlMonitorMessageExchange.<init>(WsdlMonitorMessageExchange.java:28) at com.eviware.soapui.impl.wsdl.monitor.JProxyServletWsdlMonitorMessageExchange.<init>(JProxyServletWsdlMonitorMessageExchange.java:86) at com.eviware.soapui.impl.wsdl.monitor.jettyproxy.ProxyServlet.service(ProxyServlet.java:173) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at com.eviware.soapui.impl.wsdl.monitor.jettyproxy.JettyServer.handle(JettyServer.java:76) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
Error reproduced on version 5.5.0, not reproduced on 4.6.4 ; regression maybe introduced by commit fa96f21.
The pull request only adds a null check on modelItem and set default value of discardResponse to false in case of null ; http monitor working again with just this.