Issue #4903 - changes from review

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
Lachlan Roberts 2020-05-26 09:35:17 +10:00
parent add00c9dd8
commit 470d948504
1 changed files with 6 additions and 3 deletions

View File

@ -130,7 +130,7 @@ public class ServerContainer extends ClientContainer implements javax.websocket.
{
if (deferredEndpointClasses == null)
{
deferredEndpointClasses = new ArrayList<Class<?>>();
deferredEndpointClasses = new ArrayList<>();
}
deferredEndpointClasses.add(endpointClass);
}
@ -161,7 +161,7 @@ public class ServerContainer extends ClientContainer implements javax.websocket.
{
if (deferredEndpointConfigs == null)
{
deferredEndpointConfigs = new ArrayList<ServerEndpointConfig>();
deferredEndpointConfigs = new ArrayList<>();
}
deferredEndpointConfigs.add(config);
}
@ -216,7 +216,10 @@ public class ServerContainer extends ClientContainer implements javax.websocket.
}
else
{
throw new DeploymentException("Unable to identify as valid Endpoint: " + endpoint);
String err = "Not a recognized websocket [" + endpoint.getName() +
"] does not extend @" + ServerEndpoint.class.getName() +
" or extend from " + Endpoint.class.getName();
throw new DeploymentException(err);
}
return metadata;