struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mr...@apache.org
Subject svn commit: r491547 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java
Date Mon, 01 Jan 2007 08:54:17 GMT
Author: mrdon
Date: Mon Jan  1 00:54:16 2007
New Revision: 491547

URL: http://svn.apache.org/viewvc?view=rev&rev=491547
Log:
Fixing namespace slash check in such a way it doesn't break half the tests
WW-1523

Modified:
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java?view=diff&rev=491547&r1=491546&r2=491547
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java
(original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java
Mon Jan  1 00:54:16 2007
@@ -349,7 +349,7 @@
             for (Iterator i = config.getPackageConfigs().values().iterator(); i
                     .hasNext();) {
                 String ns = ((PackageConfig) i.next()).getNamespace();
-                if (ns != null && prefix.startsWith(ns + "/")) {
+                if (ns != null && prefix.startsWith(ns) && (prefix.length()
== ns.length() || prefix.charAt(ns.length()) == '/')) {
                     if (ns.length() > namespace.length()) {
                         namespace = ns;
                     }



Mime
View raw message