[ 
https://issues.apache.org/jira/browse/JCR-3992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15370747#comment-15370747
 ] 

Carsten Ziegeler commented on JCR-3992:
---------------------------------------

Sorry for the mess, the following patch should fix the problem:

Index: src/main/java/org/apache/jackrabbit/commons/JcrUtils.java
===================================================================
--- src/main/java/org/apache/jackrabbit/commons/JcrUtils.java   (Revision 
1752156)
+++ src/main/java/org/apache/jackrabbit/commons/JcrUtils.java   (Arbeitskopie)
@@ -1561,7 +1561,7 @@
 
         if (existingPath != null) {
             baseNode = baseNode.getSession().getNode(existingPath);
-            path = path.substring(existingPath.length() + 1);
+            path = fullPath.substring(existingPath.length() + 1);
         }
 
         Node node = baseNode;

> JcrUtils.getOrCreateByPath broken by JCR-3987
> ---------------------------------------------
>
>                 Key: JCR-3992
>                 URL: https://issues.apache.org/jira/browse/JCR-3992
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-commons
>    Affects Versions: 2.13.0
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>
> The code introduced with OAK-3987 fails for an input of
>    /rep:security/rep:authorizables/rep:groups/a/b/c
> as, after discovering that
>    /rep:security/rep:authorizables/rep:groups
> exists, it computes a remaining path of
>    /b/c
> instead of
>    a/b/c



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to