You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Levente Santha (JIRA)" <ji...@apache.org> on 2014/11/14 16:36:33 UTC

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

Levente Santha created SLING-4164:
-------------------------------------

             Summary: 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


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)