jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r496118 - in /jackrabbit/trunk/jackrabbit-jcr-commons/src: main/java/org/apache/jackrabbit/name/ParsingPathResolver.java test/java/org/apache/jackrabbit/name/ParsingPathResolverTest.java
Date Sun, 14 Jan 2007 19:52:03 GMT
Author: jukka
Date: Sun Jan 14 11:52:03 2007
New Revision: 496118

URL: http://svn.apache.org/viewvc?view=rev&rev=496118
Log:
JCR-688: PathResolver.getJCRPath("/x[1]") is "/x", as expected by TCK!

Modified:
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/name/ParsingPathResolver.java
    jackrabbit/trunk/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/name/ParsingPathResolverTest.java

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/name/ParsingPathResolver.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/name/ParsingPathResolver.java?view=diff&rev=496118&r1=496117&r2=496118
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/name/ParsingPathResolver.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/name/ParsingPathResolver.java
Sun Jan 14 11:52:03 2007
@@ -134,7 +134,11 @@
                 buffer.append("..");
             } else {
                 buffer.append(resolver.getJCRName(elements[i].getName()));
-                if (elements[i].getIndex() != 0) {
+                /**
+                 * FIXME the [1] subscript should only be suppressed if the
+                 * item in question can't have same-name siblings.
+                 */
+                if (elements[i].getIndex() > Path.INDEX_DEFAULT) {
                     buffer.append('[');
                     buffer.append(elements[i].getIndex());
                     buffer.append(']');

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/name/ParsingPathResolverTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/name/ParsingPathResolverTest.java?view=diff&rev=496118&r1=496117&r2=496118
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/name/ParsingPathResolverTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/test/java/org/apache/jackrabbit/name/ParsingPathResolverTest.java
Sun Jan 14 11:52:03 2007
@@ -70,7 +70,7 @@
         assertValidPath("..");
         assertValidPath("x");
         assertValidPath("x:y");
-        assertValidPath("x[1]");
+        assertValidPath("x[2]");
         assertValidPath("x:y[123]");
 
         assertValidPath("/a/b/c");



Mime
View raw message