You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Antonio Sanso (JIRA)" <ji...@apache.org> on 2015/01/19 11:42:36 UTC

[jira] [Closed] (SLING-4164) Order of children is not preserved for SyntheticResource.

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

Antonio Sanso closed SLING-4164.
--------------------------------

> 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)