[ 
https://issues.apache.org/jira/browse/SLING-4164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carsten Ziegeler resolved SLING-4164.
-------------------------------------
    Resolution: Fixed

Thanks Levente, I've applied your patch

> Order of children is not preserved for SyntheticResource.
> ---------------------------------------------------------
>
>                 Key: SLING-4164
>                 URL: https://issues.apache.org/jira/browse/SLING-4164
>             Project: Sling
>          Issue Type: Bug
>          Components: ResourceResolver
>    Affects Versions: Resource Resolver 1.1.6
>         Environment: AEM 6.0
>            Reporter: Levente Santha
>            Assignee: Carsten Ziegeler
>             Fix For: Resource Resolver 1.1.10
>
>         Attachments: SLING-4164.patch
>
>
> When Resource.listChildren() is called on a SyntheticResource the order of 
> children returned by the iterator doesn't much the order of children returned 
> by the ResourceProvider which is the origin of the SyntheticResource. At some 
> in point between Resource.listChildren() and ResourceProvider.listChildren() 
> the children get shuffled.
> An investigation in Sling resource resolver project revealed that a possible 
> cause of the issue is in 
> org.apache.sling.resourceresolver.impl.helper.ResourceIterator.seek() where 
> SyntheticResource objects are stored in a delayed Map before getting 
> returned. For this map a HashMap is used which doesn't preserve the insertion 
> order of its entries. Using LinkedHashMap for the delayed Map might be the 
> solution for this.



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

Reply via email to