jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r210094 - /incubator/jackrabbit/trunk/commons/src/java/org/apache/jackrabbit/name/Path.java
Date Mon, 11 Jul 2005 10:20:28 GMT
Author: stefan
Date: Mon Jul 11 03:20:26 2005
New Revision: 210094

URL: http://svn.apache.org/viewcvs?rev=210094&view=rev
Log:
JCR-144: Path parser does not allow trailing slashes

Modified:
    incubator/jackrabbit/trunk/commons/src/java/org/apache/jackrabbit/name/Path.java

Modified: incubator/jackrabbit/trunk/commons/src/java/org/apache/jackrabbit/name/Path.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/commons/src/java/org/apache/jackrabbit/name/Path.java?rev=210094&r1=210093&r2=210094&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/commons/src/java/org/apache/jackrabbit/name/Path.java (original)
+++ incubator/jackrabbit/trunk/commons/src/java/org/apache/jackrabbit/name/Path.java Mon Jul
11 03:20:26 2005
@@ -371,6 +371,10 @@
                 leadingParent = false;
                 continue;
             }
+            if (elem.length() == 0 && i == elems.length - 1) {
+                // ignore trailing '/'
+                break;
+            }
             Matcher matcher = PATH_ELEMENT_PATTERN.matcher(elem);
             if (matcher.matches()) {
                 if (resolver == null) {



Mime
View raw message