forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r699301 - /forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/impl/XMLStructurerAxiom.java
Date Fri, 26 Sep 2008 12:47:39 GMT
Author: thorsten
Date: Fri Sep 26 05:47:38 2008
New Revision: 699301

URL: http://svn.apache.org/viewvc?rev=699301&view=rev
Log:
Fixing bug that occured when the xpath of the structurer had been '/'

Modified:
    forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/impl/XMLStructurerAxiom.java

Modified: forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/impl/XMLStructurerAxiom.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/impl/XMLStructurerAxiom.java?rev=699301&r1=699300&r2=699301&view=diff
==============================================================================
--- forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/impl/XMLStructurerAxiom.java
(original)
+++ forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/impl/XMLStructurerAxiom.java
Fri Sep 26 05:47:38 2008
@@ -104,8 +104,11 @@
           if (format.equals(m_type)) {
             log.debug("matched - need to process");
             // adding the default path
-            if (!"/".equals(String.valueOf(path.charAt(0)))) {
+            boolean startsWithRoot = "/".equals(String.valueOf(path.charAt(0)));
+            if (!startsWithRoot) {
               path = "/" + path;
+            }else if(path.length()==1 && startsWithRoot){
+              path="";
             }
             currentPath += path;
             AXIOMXPathPatched xpath = new AXIOMXPathPatched(currentPath);



Mime
View raw message