fix NPE from contextClassLoader in XmlBasedHttpClientProvider
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
parent
81c88cdde0
commit
a91a7630e0
|
@ -34,7 +34,11 @@ class XmlBasedHttpClientProvider
|
|||
|
||||
public static HttpClient get(@SuppressWarnings("unused") WebSocketContainerScope scope)
|
||||
{
|
||||
URL resource = Thread.currentThread().getContextClassLoader().getResource("jetty-websocket-httpclient.xml");
|
||||
ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
|
||||
if (contextClassLoader == null)
|
||||
return null;
|
||||
|
||||
URL resource = contextClassLoader.getResource("jetty-websocket-httpclient.xml");
|
||||
if (resource == null)
|
||||
return null;
|
||||
|
||||
|
|
Loading…
Reference in New Issue