tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r944217 - in /tomcat/trunk: java/org/apache/catalina/deploy/LocalStrings.properties java/org/apache/catalina/deploy/WebXml.java test/org/apache/catalina/deploy/TestWebXmlOrdering.java
Date Fri, 14 May 2010 12:07:00 GMT
Author: pero
Date: Fri May 14 12:07:00 2010
New Revision: 944217

URL: http://svn.apache.org/viewvc?rev=944217&view=rev
Log:
Warn to be used wrong fragment name at web.xml!

Modified:
    tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties
    tomcat/trunk/java/org/apache/catalina/deploy/WebXml.java
    tomcat/trunk/test/org/apache/catalina/deploy/TestWebXmlOrdering.java

Modified: tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties?rev=944217&r1=944216&r2=944217&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties Fri May 14 12:07:00
2010
@@ -41,3 +41,4 @@ webXml.mergeConflictString=The [{0}] wit
 webXml.multipleOther=Multiple others entries in ordering
 webxml.unrecognisedPublicId=The public ID [{0}] did not match any of the known public ID's
for web.xml files so the version could not be identified
 webXml.version.nfe=Unable to parse [{0}] from the version string [{1}]. This component of
the version string will be ignored. 
+webXml.wrongFragmentName=Used a wrong fragment name {0} at web.xml absolute-ordering tag!

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=944217&r1=944216&r2=944217&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/deploy/WebXml.java (original)
+++ tomcat/trunk/java/org/apache/catalina/deploy/WebXml.java Fri May 14 12:07:00 2010
@@ -2101,6 +2101,8 @@ public class WebXml {
                     WebXml fragment = fragments.get(requestedName);
                     if (fragment != null) {
                         orderedFragments.add(fragment);
+                    } else {
+                        log.warn(sm.getString("webXml.wrongFragmentName",requestedName));
                     }
                 }
             }

Modified: tomcat/trunk/test/org/apache/catalina/deploy/TestWebXmlOrdering.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/deploy/TestWebXmlOrdering.java?rev=944217&r1=944216&r2=944217&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/deploy/TestWebXmlOrdering.java (original)
+++ tomcat/trunk/test/org/apache/catalina/deploy/TestWebXmlOrdering.java Fri May 14 12:07:00
2010
@@ -144,6 +144,14 @@ public class TestWebXmlOrdering extends 
         assertFalse(iter.hasNext());
     }
 
+    public void testWebFragmentsAbsoluteWrongFragmentName() {
+        app.addAbsoluteOrdering("a");
+        app.addAbsoluteOrdering("z");
+        Set<WebXml> ordered = WebXml.orderWebFragments(app, fragments);
+        assertEquals(1,ordered.size());
+        assertEquals(fragments.get("a"),ordered.toArray()[0]);
+    }
+    
     public void testOrderWebFragmentsAbsoluteOthersEnd() {
         app.addAbsoluteOrdering("b");
         app.addAbsoluteOrdering("d");



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


Mime
View raw message