jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1461572 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/NamePathMapperImpl.java
Date Wed, 27 Mar 2013 13:36:00 GMT
Author: jukka
Date: Wed Mar 27 13:36:00 2013
New Revision: 1461572

URL: http://svn.apache.org/r1461572
Log:
OAK-721: NamePathMapperImpl: weird error message "index > 1"

Allow SNS indexes when converting Oak paths to JCR ones.

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/NamePathMapperImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/NamePathMapperImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/NamePathMapperImpl.java?rev=1461572&r1=1461571&r2=1461572&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/NamePathMapperImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/NamePathMapperImpl.java
Wed Mar 27 13:36:00 2013
@@ -106,11 +106,12 @@ public class NamePathMapperImpl implemen
 
             @Override
             public boolean name(String name, int index) {
-                if (index > 1) {
-                    error("index > 1; = " + index + " for path " + oakPath + " and name
" + name);
-                }
                 String p = nameMapper.getJcrName(name);
-                elements.add(p);
+                if (index == 0) {
+                    elements.add(p);
+                } else {
+                    elements.add(p + "[" + index + "]");
+                }
                 return true;
             }
         };



Mime
View raw message