Update Jetty WebSocketConfiguration classes

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
Lachlan Roberts 2020-11-06 19:03:52 +11:00
parent 416579a690
commit fa1914a5b1
2 changed files with 5 additions and 6 deletions

View File

@ -20,7 +20,6 @@ package org.eclipse.jetty.websocket.client.config;
import java.util.ServiceLoader;
import org.eclipse.jetty.util.Loader;
import org.eclipse.jetty.webapp.AbstractConfiguration;
import org.eclipse.jetty.webapp.Configuration;
import org.eclipse.jetty.webapp.FragmentConfiguration;
@ -34,7 +33,7 @@ import org.slf4j.LoggerFactory;
/**
* <p>Websocket Configuration</p>
* <p>This configuration configures the WebAppContext server/system classes to
* be able to see the org.eclipse.jetty.websocket package.
* be able to see the {@code org.eclipse.jetty.websocket.client} package.
* This class is defined in the webapp package, as it implements the {@link Configuration} interface,
* which is unknown to the websocket package. However, the corresponding {@link ServiceLoader}
* resource is defined in the websocket package, so that this configuration only be
@ -72,7 +71,7 @@ public class JettyWebSocketClientConfiguration extends AbstractConfiguration
{
try
{
return Loader.loadClass(classname) != null;
return JettyWebSocketClientConfiguration.class.getClassLoader().loadClass(classname) != null;
}
catch (Throwable e)
{

View File

@ -20,7 +20,6 @@ package org.eclipse.jetty.websocket.server.config;
import java.util.ServiceLoader;
import org.eclipse.jetty.util.Loader;
import org.eclipse.jetty.webapp.AbstractConfiguration;
import org.eclipse.jetty.webapp.Configuration;
import org.eclipse.jetty.webapp.FragmentConfiguration;
@ -34,7 +33,8 @@ import org.slf4j.LoggerFactory;
/**
* <p>Websocket Configuration</p>
* <p>This configuration configures the WebAppContext server/system classes to
* be able to see the org.eclipse.jetty.websocket package.
* be able to see the {@code org.eclipse.jetty.websocket.api}, {@code org.eclipse.jetty.websocket.server} and
* {@code org.eclipse.jetty.websocket.util.server} packages.
* This class is defined in the webapp package, as it implements the {@link Configuration} interface,
* which is unknown to the websocket package. However, the corresponding {@link ServiceLoader}
* resource is defined in the websocket package, so that this configuration only be
@ -75,7 +75,7 @@ public class JettyWebSocketConfiguration extends AbstractConfiguration
{
try
{
return Loader.loadClass(classname) != null;
return JettyWebSocketConfiguration.class.getClassLoader().loadClass(classname) != null;
}
catch (Throwable e)
{