mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-04 12:59:30 +00:00
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…
x
Reference in New Issue
Block a user