tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1509847 - in /tomcat/trunk/java/javax/websocket: DefaultClientEndpointConfig.java server/DefaultServerEndpointConfig.java
Date Fri, 02 Aug 2013 20:28:13 GMT
Author: markt
Date: Fri Aug  2 20:28:12 2013
New Revision: 1509847

URL: http://svn.apache.org/r1509847
Log:
Use the same Map implementation for user properties to prevent implementation conflicts

Modified:
    tomcat/trunk/java/javax/websocket/DefaultClientEndpointConfig.java
    tomcat/trunk/java/javax/websocket/server/DefaultServerEndpointConfig.java

Modified: tomcat/trunk/java/javax/websocket/DefaultClientEndpointConfig.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/websocket/DefaultClientEndpointConfig.java?rev=1509847&r1=1509846&r2=1509847&view=diff
==============================================================================
--- tomcat/trunk/java/javax/websocket/DefaultClientEndpointConfig.java (original)
+++ tomcat/trunk/java/javax/websocket/DefaultClientEndpointConfig.java Fri Aug  2 20:28:12
2013
@@ -16,9 +16,9 @@
  */
 package javax.websocket;
 
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 final class DefaultClientEndpointConfig implements ClientEndpointConfig {
 
@@ -26,7 +26,7 @@ final class DefaultClientEndpointConfig 
     private final List<Extension> extensions;
     private final List<Class<? extends Encoder>> encoders;
     private final List<Class<? extends Decoder>> decoders;
-    private final Map<String,Object> userProperties = new HashMap<>();
+    private final Map<String,Object> userProperties = new ConcurrentHashMap<>();
     private final Configurator configurator;
 
 

Modified: tomcat/trunk/java/javax/websocket/server/DefaultServerEndpointConfig.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/websocket/server/DefaultServerEndpointConfig.java?rev=1509847&r1=1509846&r2=1509847&view=diff
==============================================================================
--- tomcat/trunk/java/javax/websocket/server/DefaultServerEndpointConfig.java (original)
+++ tomcat/trunk/java/javax/websocket/server/DefaultServerEndpointConfig.java Fri Aug  2 20:28:12
2013
@@ -16,9 +16,9 @@
  */
 package javax.websocket.server;
 
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import javax.websocket.Decoder;
 import javax.websocket.Encoder;
@@ -36,7 +36,7 @@ final class DefaultServerEndpointConfig 
     private final List<Class<? extends Encoder>> encoders;
     private final List<Class<? extends Decoder>> decoders;
     private final Configurator serverEndpointConfigurator;
-    private final Map<String,Object> userProperties = new HashMap<>();
+    private final Map<String,Object> userProperties = new ConcurrentHashMap<>();
 
     DefaultServerEndpointConfig(
             Class<?> endpointClass, String path,



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message