Author: markt Date: Sun Aug 4 15:08:37 2013 New Revision: 1510200 URL: http://svn.apache.org/r1510200 Log: Fix some unchecked conversion warnings.
Modified: tomcat/trunk/java/javax/websocket/ClientEndpointConfig.java tomcat/trunk/java/javax/websocket/server/ServerEndpointConfig.java tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoEndpointClient.java tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java Modified: tomcat/trunk/java/javax/websocket/ClientEndpointConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/websocket/ClientEndpointConfig.java?rev=1510200&r1=1510199&r2=1510200&view=diff ============================================================================== --- tomcat/trunk/java/javax/websocket/ClientEndpointConfig.java (original) +++ tomcat/trunk/java/javax/websocket/ClientEndpointConfig.java Sun Aug 4 15:08:37 2013 @@ -44,12 +44,12 @@ public interface ClientEndpointConfig ex } private Configurator configurator = DEFAULT_CONFIGURATOR; - private List<String> preferredSubprotocols = Collections.EMPTY_LIST; - private List<Extension> extensions = Collections.EMPTY_LIST; + private List<String> preferredSubprotocols = Collections.emptyList(); + private List<Extension> extensions = Collections.emptyList(); private List<Class<? extends Encoder>> encoders = - Collections.EMPTY_LIST; + Collections.emptyList(); private List<Class<? extends Decoder>> decoders = - Collections.EMPTY_LIST; + Collections.emptyList(); public ClientEndpointConfig build() { @@ -72,7 +72,7 @@ public interface ClientEndpointConfig ex List<String> preferredSubprotocols) { if (preferredSubprotocols == null || preferredSubprotocols.size() == 0) { - this.preferredSubprotocols = Collections.EMPTY_LIST; + this.preferredSubprotocols = Collections.emptyList(); } else { this.preferredSubprotocols = Collections.unmodifiableList(preferredSubprotocols); @@ -84,7 +84,7 @@ public interface ClientEndpointConfig ex public Builder extensions( List<Extension> extensions) { if (extensions == null || extensions.size() == 0) { - this.extensions = Collections.EMPTY_LIST; + this.extensions = Collections.emptyList(); } else { this.extensions = Collections.unmodifiableList(extensions); } @@ -94,7 +94,7 @@ public interface ClientEndpointConfig ex public Builder encoders(List<Class<? extends Encoder>> encoders) { if (encoders == null || encoders.size() == 0) { - this.encoders = Collections.EMPTY_LIST; + this.encoders = Collections.emptyList(); } else { this.encoders = Collections.unmodifiableList(encoders); } @@ -104,7 +104,7 @@ public interface ClientEndpointConfig ex public Builder decoders(List<Class<? extends Decoder>> decoders) { if (decoders == null || decoders.size() == 0) { - this.decoders = Collections.EMPTY_LIST; + this.decoders = Collections.emptyList(); } else { this.decoders = Collections.unmodifiableList(decoders); } Modified: tomcat/trunk/java/javax/websocket/server/ServerEndpointConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/websocket/server/ServerEndpointConfig.java?rev=1510200&r1=1510199&r2=1510200&view=diff ============================================================================== --- tomcat/trunk/java/javax/websocket/server/ServerEndpointConfig.java (original) +++ tomcat/trunk/java/javax/websocket/server/ServerEndpointConfig.java Sun Aug 4 15:08:37 2013 @@ -59,10 +59,12 @@ public interface ServerEndpointConfig ex private final Class<?> endpointClass; private final String path; - private List<Class<? extends Encoder>> encoders = Collections.EMPTY_LIST; - private List<Class<? extends Decoder>> decoders = Collections.EMPTY_LIST; - private List<String> subprotocols = Collections.EMPTY_LIST; - private List<Extension> extensions = Collections.EMPTY_LIST; + private List<Class<? extends Encoder>> encoders = + Collections.emptyList(); + private List<Class<? extends Decoder>> decoders = + Collections.emptyList(); + private List<String> subprotocols = Collections.emptyList(); + private List<Extension> extensions = Collections.emptyList(); private Configurator configurator = Configurator.fetchContainerDefaultConfigurator(); @@ -82,7 +84,7 @@ public interface ServerEndpointConfig ex public Builder encoders( List<Class<? extends Encoder>> encoders) { if (encoders == null || encoders.size() == 0) { - this.encoders = Collections.EMPTY_LIST; + this.encoders = Collections.emptyList(); } else { this.encoders = Collections.unmodifiableList(encoders); } @@ -93,7 +95,7 @@ public interface ServerEndpointConfig ex public Builder decoders( List<Class<? extends Decoder>> decoders) { if (decoders == null || decoders.size() == 0) { - this.decoders = Collections.EMPTY_LIST; + this.decoders = Collections.emptyList(); } else { this.decoders = Collections.unmodifiableList(decoders); } @@ -104,7 +106,7 @@ public interface ServerEndpointConfig ex public Builder subprotocols( List<String> subprotocols) { if (subprotocols == null || subprotocols.size() == 0) { - this.subprotocols = Collections.EMPTY_LIST; + this.subprotocols = Collections.emptyList(); } else { this.subprotocols = Collections.unmodifiableList(subprotocols); } @@ -115,7 +117,7 @@ public interface ServerEndpointConfig ex public Builder extensions( List<Extension> extensions) { if (extensions == null || extensions.size() == 0) { - this.extensions = Collections.EMPTY_LIST; + this.extensions = Collections.emptyList(); } else { this.extensions = Collections.unmodifiableList(extensions); } Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java?rev=1510200&r1=1510199&r2=1510200&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java Sun Aug 4 15:08:37 2013 @@ -128,7 +128,7 @@ public class WsSession implements Sessio webSocketContainer.getDefaultMaxSessionIdleTimeout(); this.requestUri = requestUri; if (requestParameterMap == null) { - this.requestParameterMap = Collections.EMPTY_MAP; + this.requestParameterMap = Collections.emptyMap(); } else { this.requestParameterMap = requestParameterMap; } @@ -299,7 +299,7 @@ public class WsSession implements Sessio @Override public List<Extension> getNegotiatedExtensions() { checkState(); - return Collections.EMPTY_LIST; + return Collections.emptyList(); } Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java?rev=1510200&r1=1510199&r2=1510200&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java Sun Aug 4 15:08:37 2013 @@ -331,7 +331,7 @@ public class WsWebSocketContainer WsSession wsSession = new WsSession(endpoint, wsRemoteEndpointClient, this, null, null, null, null, null, subProtocol, - Collections.EMPTY_MAP, false, + Collections.<String, String> emptyMap(), false, clientEndpointConfiguration); endpoint.onOpen(wsSession, clientEndpointConfiguration); registerSession(endpoint, wsSession); @@ -715,7 +715,7 @@ public class WsWebSocketContainer */ @Override public Set<Extension> getInstalledExtensions() { - return Collections.EMPTY_SET; + return Collections.emptySet(); } Modified: tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoEndpointClient.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoEndpointClient.java?rev=1510200&r1=1510199&r2=1510200&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoEndpointClient.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoEndpointClient.java Sun Aug 4 15:08:37 2013 @@ -36,7 +36,7 @@ public class PojoEndpointClient extends setPojo(pojo); setMethodMapping( new PojoMethodMapping(pojo.getClass(), decoders, null)); - setPathParameters(Collections.EMPTY_MAP); + setPathParameters(Collections.<String, String> emptyMap()); } @Override Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java?rev=1510200&r1=1510199&r2=1510200&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java Sun Aug 4 15:08:37 2013 @@ -230,7 +230,8 @@ public class WsServerContainer extends W // Check an exact match. Simple case as there are no templates. ServerEndpointConfig sec = configExactMatchMap.get(path); if (sec != null) { - return new WsMappingResult(sec, Collections.EMPTY_MAP); + return new WsMappingResult(sec, + Collections.<String, String> emptyMap()); } // No exact match. Need to look for template matches. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org