geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r329279 - in /geronimo/trunk/modules: jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Date Fri, 28 Oct 2005 19:52:10 GMT
Author: djencks
Date: Fri Oct 28 12:52:07 2005
New Revision: 329279

URL: http://svn.apache.org/viewcvs?rev=329279&view=rev
Log:
GERONIMO-1008 add lotsa trims to url patterns

Modified:
    geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
    geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java

Modified: geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java?rev=329279&r1=329278&r2=329279&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
(original)
+++ geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
Fri Oct 28 12:52:07 2005
@@ -280,7 +280,7 @@
         for (int j = 0; j < servletMappings.length; j++) {
             ServletMappingType servletMapping = servletMappings[j];
             String servletName = servletMapping.getServletName().getStringValue().trim();
-            map.put(servletName, contextRoot + servletMapping.getUrlPattern().getStringValue());
+            map.put(servletName, contextRoot + servletMapping.getUrlPattern().getStringValue().trim());
         }
         return map;
     }
@@ -621,7 +621,7 @@
             for (int i = 0; i < servletMappingArray.length; i++) {
                 ServletMappingType servletMappingType = servletMappingArray[i];
                 String servletName = servletMappingType.getServletName().getStringValue().trim();
-                String urlPattern = servletMappingType.getUrlPattern().getStringValue();
+                String urlPattern = servletMappingType.getUrlPattern().getStringValue().trim();
                 if (!knownServletMappings.contains(urlPattern)) {
                     knownServletMappings.add(urlPattern);
                     checkString(urlPattern);
@@ -704,7 +704,7 @@
                 ObjectName filterMappingName = null;
                 if (filterMappingType.isSetUrlPattern()) {
                     //do not trim!
-                    String urlPattern = filterMappingType.getUrlPattern().getStringValue();
+                    String urlPattern = filterMappingType.getUrlPattern().getStringValue().trim();
                     filterMappingData.setAttribute("urlPattern", urlPattern);
                     filterMappingName = NameFactory.getWebFilterMappingName(null, null, null,
null, filterName, null, urlPattern, moduleJ2eeContext);
                 }
@@ -1057,8 +1057,7 @@
                 UrlPatternType[] urlPatternTypeArray = webResourceCollectionType.getUrlPatternArray();
                 for (int k = 0; k < urlPatternTypeArray.length; k++) {
                     UrlPatternType urlPatternType = urlPatternTypeArray[k];
-                    //presumably, don't trim
-                    String url = urlPatternType.getStringValue();
+                    String url = urlPatternType.getStringValue().trim();
                     URLPattern pattern = (URLPattern) currentPatterns.get(url);
                     if (pattern == null) {
                         pattern = new URLPattern(url);
@@ -1294,13 +1293,13 @@
         FilterMappingType[] filterMappings = webApp.getFilterMappingArray();
         for (int i = 0; i < filterMappings.length; i++) {
             if (filterMappings[i].isSetUrlPattern()) {
-                checkString(filterMappings[i].getUrlPattern().getStringValue());
+                checkString(filterMappings[i].getUrlPattern().getStringValue().trim());
             }
         }
 
         ServletMappingType[] servletMappings = webApp.getServletMappingArray();
         for (int i = 0; i < servletMappings.length; i++) {
-            checkString(servletMappings[i].getUrlPattern().getStringValue());
+            checkString(servletMappings[i].getUrlPattern().getStringValue().trim());
         }
 
         SecurityConstraintType[] constraints = webApp.getSecurityConstraintArray();
@@ -1309,7 +1308,7 @@
             for (int j = 0; j < collections.length; j++) {
                 UrlPatternType[] patterns = collections[j].getUrlPatternArray();
                 for (int k = 0; k < patterns.length; k++) {
-                    checkString(patterns[k].getStringValue());
+                    checkString(patterns[k].getStringValue().trim());
                 }
             }
         }

Modified: geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?rev=329279&r1=329278&r2=329279&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
(original)
+++ geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Fri Oct 28 12:52:07 2005
@@ -234,7 +234,7 @@
         for (int j = 0; j < servletMappings.length; j++) {
             ServletMappingType servletMapping = servletMappings[j];
             String servletName = servletMapping.getServletName().getStringValue().trim();
-            map.put(servletName, contextRoot + servletMapping.getUrlPattern().getStringValue());
+            map.put(servletName, contextRoot + servletMapping.getUrlPattern().getStringValue().trim());
         }
         return map;
     }
@@ -638,7 +638,7 @@
                 for (int k = 0; k < urlPatternTypeArray.length; k++) {
                     UrlPatternType urlPatternType = urlPatternTypeArray[k];
                     //presumably, don't trim
-                    String url = urlPatternType.getStringValue();
+                    String url = urlPatternType.getStringValue().trim();
                     URLPattern pattern = (URLPattern) currentPatterns.get(url);
                     if (pattern == null) {
                         pattern = new URLPattern(url);
@@ -874,13 +874,13 @@
         FilterMappingType[] filterMappings = webApp.getFilterMappingArray();
         for (int i = 0; i < filterMappings.length; i++) {
             if (filterMappings[i].isSetUrlPattern()) {
-                checkString(filterMappings[i].getUrlPattern().getStringValue());
+                checkString(filterMappings[i].getUrlPattern().getStringValue().trim());
             }
         }
 
         ServletMappingType[] servletMappings = webApp.getServletMappingArray();
         for (int i = 0; i < servletMappings.length; i++) {
-            checkString(servletMappings[i].getUrlPattern().getStringValue());
+            checkString(servletMappings[i].getUrlPattern().getStringValue().trim());
         }
 
         SecurityConstraintType[] constraints = webApp.getSecurityConstraintArray();
@@ -889,7 +889,7 @@
             for (int j = 0; j < collections.length; j++) {
                 UrlPatternType[] patterns = collections[j].getUrlPatternArray();
                 for (int k = 0; k < patterns.length; k++) {
-                    checkString(patterns[k].getStringValue());
+                    checkString(patterns[k].getStringValue().trim());
                 }
             }
         }



Mime
View raw message