SLING-7593 : ResourceTraversor doesn't support ResourceDecorator pattern. Apply patch from Joanna Jasnowska
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 02d4739..315355e 100644
--- a/src/main/java/org/apache/sling/api/resource/ResourceUtil.java
+++ b/src/main/java/org/apache/sling/api/resource/ResourceUtil.java
@@ -373,12 +373,7 @@
*/
@Deprecated
public static @Nonnull Iterator<Resource> listChildren(@Nonnull Resource parent) {
- /*
- * 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);
+ return parent.listChildren();
}
/**
@@ -471,9 +466,9 @@
* 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>.