You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2012/01/02 21:15:32 UTC
svn commit: r1226538 -
/tomcat/trunk/java/org/apache/catalina/deploy/WebXml.java
Author: markt
Date: Mon Jan 2 20:15:31 2012
New Revision: 1226538
URL: http://svn.apache.org/viewvc?rev=1226538&view=rev
Log:
https://issues.apache.org/bugzilla/show_bug.cgi?id=52405
Servlet 3.0 Rev A updates
Item 12 of 20
Identical resources in fragments are retained
Modified:
tomcat/trunk/java/org/apache/catalina/deploy/WebXml.java
Modified: tomcat/trunk/java/org/apache/catalina/deploy/WebXml.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/WebXml.java?rev=1226538&r1=1226537&r2=1226538&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/deploy/WebXml.java (original)
+++ tomcat/trunk/java/org/apache/catalina/deploy/WebXml.java Mon Jan 2 20:15:31 2012
@@ -1896,15 +1896,19 @@ public class WebXml {
}
} else {
// Not defined in main web.xml
- if (tempResources.containsKey(resourceName)) {
- log.error(sm.getString(
- "webXml.mergeConflictResource",
- resourceName,
- fragment.getName(),
- fragment.getURL()));
- return false;
+ T existingResource = tempResources.get(resourceName);
+ if (existingResource != null) {
+ if (!existingResource.equals(resource)) {
+ log.error(sm.getString(
+ "webXml.mergeConflictResource",
+ resourceName,
+ fragment.getName(),
+ fragment.getURL()));
+ return false;
+ }
+ } else {
+ tempResources.put(resourceName, resource);
}
- tempResources.put(resourceName, resource);
}
}
return true;
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org