Polishing

This commit is contained in:
Juergen Hoeller
2016-08-30 23:57:11 +02:00
parent 03609c1518
commit 4ef428de28
5 changed files with 31 additions and 20 deletions

View File

@@ -107,8 +107,7 @@ public class ServerEndpointRegistration extends ServerEndpointConfig.Configurato
@Override
public Class<? extends Endpoint> getEndpointClass() {
return (this.endpoint != null) ?
this.endpoint.getClass() : ((Class<? extends Endpoint>) this.endpointProvider.getHandlerType());
return (this.endpoint != null ? this.endpoint.getClass() : this.endpointProvider.getHandlerType());
}
public Endpoint getEndpoint() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,6 @@
package org.springframework.web.socket.server.standard;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -65,7 +64,7 @@ public class TomcatRequestUpgradeStrategy extends AbstractStandardUpgradeStrateg
Map<String, String> pathParams = Collections.<String, String> emptyMap();
ServerEndpointRegistration endpointConfig = new ServerEndpointRegistration(path, endpoint);
endpointConfig.setSubprotocols(Arrays.asList(selectedProtocol));
endpointConfig.setSubprotocols(Collections.singletonList(selectedProtocol));
endpointConfig.setExtensions(selectedExtensions);
try {