Author: markt
Date: Thu Jun 27 21:49:04 2013
New Revision: 1497578
URL: http://svn.apache.org/r1497578
Log:
Copy duplicate path checks for annotation deloyments.
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=1497578&r1=1497577&r2=1497578&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:49:04 2013
@@ -238,10 +238,19 @@ public class WsServerContainer extends W
configTemplateMatchMap.putIfAbsent(key, templateMatches);
templateMatches = configTemplateMatchMap.get(key);
}
- templateMatches.add(new TemplatePathMatch(sec, uriTemplate));
+ if (!templateMatches.add(new TemplatePathMatch(sec, uriTemplate)))
{
+ // Duplicate uriTemplate;
+ throw new DeploymentException(
+ sm.getString("serverContainer.duplicatePaths", path));
+ }
} else {
// Exact match
- configExactMatchMap.put(path, sec);
+ ServerEndpointConfig old = configExactMatchMap.put(path, sec);
+ if (old != null) {
+ // Duplicate path mappings
+ throw new DeploymentException(
+ sm.getString("serverContainer.duplicatePaths", path));
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]