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

Ian Boston commented on SLING-5005:
-----------------------------------

To verify, enable debug logging on 
org.apache.sling.jcr.resource.internal.helper.jcr.JcrNodeResourceIterator  and 
iterate through a Resource from "/".

{code}
08.09.2015 07:59:53.485 *DEBUG* [pool-12-thread-26-<main 
queue>(com/adobe/aem/core/migrate/BACKUP)] 
org.apache.sling.jcr.resource.internal.helper.jcr.JcrNodeResourceIterator seek: 
Returning Resource JcrNodeResource, type=sling:Folder, superType=null, 
path=//apps
08.09.2015 07:59:53.485 *DEBUG* [pool-12-thread-26-<main 
queue>(com/adobe/aem/core/migrate/BACKUP)] 
org.apache.sling.jcr.resource.internal.helper.jcr.JcrNodeResourceIterator seek: 
Returning Resource JcrNodeResource, type=nt:folder, superType=null, path=//bin
08.09.2015 07:59:53.486 *DEBUG* [pool-12-thread-26-<main 
queue>(com/adobe/aem/core/migrate/BACKUP)] 
org.apache.sling.jcr.resource.internal.helper.jcr.JcrNodeResourceIterator seek: 
Returning Resource JcrNodeResource, type=sling:Folder, superType=null, 
path=//conf
08.09.2015 07:59:53.486 *DEBUG* [pool-12-thread-26-<main 
queue>(com/adobe/aem/core/migrate/BACKUP)] 
org.apache.sling.jcr.resource.internal.helper.jcr.JcrNodeResourceIterator seek: 
Returning Resource JcrNodeResource, type=sling:redirect, superType=null, 
path=//content
08.09.2015 07:59:53.486 *DEBUG* [pool-12-thread-26-<main 
queue>(com/adobe/aem/core/migrate/BACKUP)] 
org.apache.sling.jcr.resource.internal.helper.jcr.JcrNodeResourceIterator seek: 
Returning Resource JcrNodeResource, type=sling:Folder, superType=null, 
path=//etc
{code}

org.apache.sling.jcr.resource.internal.helper.jcr.JcrNodeResourceIterator#seek 
calls 
org.apache.sling.jcr.resource.internal.helper.jcr.JcrNodeResourceIterator#getPath
 which has test coverage for the "/".

May be an issue with node.getName() or node.getPath() for children of the root 
path. Checking to see if possible to reproduce in Sling trunk.



> Root Resource lists child Resource paths incorrecty
> ---------------------------------------------------
>
>                 Key: SLING-5005
>                 URL: https://issues.apache.org/jira/browse/SLING-5005
>             Project: Sling
>          Issue Type: Bug
>          Components: ResourceResolver
>    Affects Versions: JCR Resource 2.5.0
>         Environment: AEM 6.1 running JCR Resource 2.5.0 on MongoMK.
>            Reporter: Ian Boston
>            Assignee: Ian Boston
>
> The following code appears to generate incorrect paths that when given to 
> other bundles that dont expect messy paths causes problems.
> {code}
> Iterator<Resource>  i = resourceResolver.getResource("/").listChildren();
> while(i.hasNext()) {
>   LOGGER.info("Child Path {} ",i.next().getPath());
> }
> {code}
> Produces
> {code}
> ...
> //etc
> ...
> /content
> ...
> /libs
> {code}
> The // on some of the root resources causes issues.
> Might be Oak related.



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

Reply via email to