Author: markt
Date: Thu Jun 27 21:46:32 2013
New Revision: 1497576
URL: http://svn.apache.org/r1497576
Log:
Follow-up to r1497569. More thread-safety
Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
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=1497576&r1=1497575&r2=1497576&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
Thu Jun 27 21:46:32 2013
@@ -153,7 +153,8 @@ public class WsServerContainer extends W
if (templateMatches == null) {
templateMatches = new TreeSet<>(
TemplatePathMatchComparator.getInstance());
- configTemplateMatchMap.put(key, templateMatches);
+ configTemplateMatchMap.putIfAbsent(key, templateMatches);
+ templateMatches = configTemplateMatchMap.get(key);
}
if (!templateMatches.add(new TemplatePathMatch(sec, uriTemplate)))
{
// Duplicate uriTemplate;
@@ -247,7 +248,6 @@ public class WsServerContainer extends W
public WsMappingResult findMapping(String path) {
-
// Check an exact match. Simple case as there are no templates.
ServerEndpointConfig sec = configExactMatchMap.get(path);
if (sec != null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]