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

cziegeler 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 9ab7499  Update comment for ResourceUtil#listChildren
9ab7499 is described below

commit 9ab7499c244587746cf1dcd01e67c68eeabf7e70
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Tue Aug 21 16:30:42 2018 +0200

    Update comment for ResourceUtil#listChildren
---
 .../java/org/apache/sling/api/resource/ResourceUtil.java  | 15 +++++----------
 1 file changed, 5 insertions(+), 10 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 fdbcc29..2731fe1 100644
--- a/src/main/java/org/apache/sling/api/resource/ResourceUtil.java
+++ b/src/main/java/org/apache/sling/api/resource/ResourceUtil.java
@@ -25,10 +25,9 @@ import java.util.Iterator;
 import java.util.Map;
 import java.util.NoSuchElementException;
 
-import org.jetbrains.annotations.Nullable;
-import org.jetbrains.annotations.NotNull;
-
 import org.apache.sling.api.wrappers.ValueMapDecorator;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 
 /**
  * The <code>ResourceUtil</code> class provides helper methods dealing with
@@ -373,11 +372,7 @@ public class ResourceUtil {
      */
     @Deprecated
     public static @NotNull Iterator<Resource> listChildren(@NotNull 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.
-         */
+        // directly call the resource resolver to ensure the correct result
         return parent.getResourceResolver().listChildren(parent);
     }
 
@@ -471,9 +466,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