You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 10:20:13 UTC
[sling-org-apache-sling-testing-resourceresolver-mock] 05/15:
SLING-3847 : MockResourceResolver: resource order is not preserved in
listChildren method. Apply patch from Stefan Seifert
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.testing.resourceresolver-mock-0.3.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-resourceresolver-mock.git
commit 7d7fab18aa50d3a858d76e53557a3f2cbe39ef76
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Aug 15 16:16:42 2014 +0000
SLING-3847 : MockResourceResolver: resource order is not preserved in listChildren method. Apply patch from Stefan Seifert
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/resourceresolver-mock@1618220 13f79535-47bb-0310-9956-ffa450edef68
---
.../org/apache/sling/testing/resourceresolver/MockResourceResolver.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/sling/testing/resourceresolver/MockResourceResolver.java b/src/main/java/org/apache/sling/testing/resourceresolver/MockResourceResolver.java
index a28b62b..1c383c0 100644
--- a/src/main/java/org/apache/sling/testing/resourceresolver/MockResourceResolver.java
+++ b/src/main/java/org/apache/sling/testing/resourceresolver/MockResourceResolver.java
@@ -135,7 +135,7 @@ public class MockResourceResolver implements ResourceResolver {
@Override
public Iterator<Resource> listChildren(final Resource parent) {
final String prefixPath = parent.getPath() + "/";
- final Map<String, Map<String, Object>> candidates = new HashMap<String, Map<String,Object>>();
+ final Map<String, Map<String, Object>> candidates = new LinkedHashMap<String, Map<String,Object>>();
synchronized ( this.resources ) {
for(final Map.Entry<String, Map<String, Object>> e : this.resources.entrySet()) {
if (e.getKey().startsWith(prefixPath) && e.getKey().lastIndexOf('/') < prefixPath.length() ) {
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.