You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by oz...@apache.org on 2005/02/14 06:08:19 UTC

svn commit: r153714 - jakarta/commons/sandbox/xmlio/trunk/src/java/org/apache/commons/xmlio/in/SimplePath.java

Author: ozeigermann
Date: Sun Feb 13 21:08:17 2005
New Revision: 153714

URL: http://svn.apache.org/viewcvs?view=rev&rev=153714
Log:
Fix in matching for the rare situation when
there is something like relative path a/b matches
.../na/b while it should only match .../a/b

Modified:
    jakarta/commons/sandbox/xmlio/trunk/src/java/org/apache/commons/xmlio/in/SimplePath.java

Modified: jakarta/commons/sandbox/xmlio/trunk/src/java/org/apache/commons/xmlio/in/SimplePath.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/xmlio/trunk/src/java/org/apache/commons/xmlio/in/SimplePath.java?view=diff&r1=153713&r2=153714
==============================================================================
--- jakarta/commons/sandbox/xmlio/trunk/src/java/org/apache/commons/xmlio/in/SimplePath.java (original)
+++ jakarta/commons/sandbox/xmlio/trunk/src/java/org/apache/commons/xmlio/in/SimplePath.java Sun Feb 13 21:08:17 2005
@@ -1,7 +1,7 @@
 /*
  * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons-sandbox//xmlio/src/java/org/apache/commons/xmlio/in/SimplePath.java,v 1.1 2004/10/08 11:56:20 ozeigermann Exp $
  * $Revision: 1.1 $
- * $Date: 2004/10/08 11:56:20 $
+ * $Date$
  *
  * ====================================================================
  *
@@ -144,7 +144,7 @@
 
         if (matchString != null && matchString.length() > 0 && matchString.charAt(0) != '/') {
             // relative
-            return path.endsWith(matchString);
+            return path.endsWith("/" + matchString);
         } else {
             // absolute
             return path.equals(matchString);



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