This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-api.git


The following commit(s) were added to refs/heads/master by this push:
     new 88b2222  Revert "SLING-7593 : ResourceTraversor doesn't support 
ResourceDecorator pattern. Apply patch from Joanna Jasnowska"
88b2222 is described below

commit 88b2222d69f8dcbae0f158e94133b78f73b556b9
Author: Robert Munteanu <[email protected]>
AuthorDate: Fri Aug 17 17:42:02 2018 +0200

    Revert "SLING-7593 : ResourceTraversor doesn't support ResourceDecorator 
pattern. Apply patch from Joanna Jasnowska"
    
    This reverts commit 292c461f6223865026c8522ac5167a042a168854.
    
    This change has introduced a regression in the way missing resources
    with existing children are rendered, see SLING-7833 for details.
---
 src/main/java/org/apache/sling/api/resource/ResourceUtil.java | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/sling/api/resource/ResourceUtil.java 
b/src/main/java/org/apache/sling/api/resource/ResourceUtil.java
index c1a0738..fdbcc29 100644
--- a/src/main/java/org/apache/sling/api/resource/ResourceUtil.java
+++ b/src/main/java/org/apache/sling/api/resource/ResourceUtil.java
@@ -373,7 +373,12 @@ public class ResourceUtil {
      */
     @Deprecated
     public static @NotNull Iterator<Resource> listChildren(@NotNull Resource 
parent) {
-        return parent.listChildren();
+        /*
+         * Same as AbstractResource.listChildren() implementation to prevent
+         * problems if there are implementations of the pre-2.1.0 Resource
+         * interface in the framework.
+         */
+        return parent.getResourceResolver().listChildren(parent);
     }
 
     /**
@@ -466,9 +471,9 @@ public class ResourceUtil {
      * to go up the resource super type hierarchy.
      *
      * In case the type of the given resource or the given resource type 
starts with one of the resource resolver's search paths
-     * it is converted to a relative resource type by stripping off the 
resource resolver's search path
+     * it is converted to a relative resource type by stripping off the 
resource resolver's search path 
      * before doing the comparison.
-     *
+     * 
      * @param resource the resource to check
      * @param resourceType the resource type to check the resource against
      * @return <code>false</code> if <code>resource</code> is 
<code>null</code>.

Reply via email to