zx8410-ops commented on code in PR #870:
URL: https://github.com/apache/commons-io/pull/870#discussion_r3780353418


##########
src/main/java/org/apache/commons/io/monitor/FileAlterationObserver.java:
##########
@@ -527,7 +585,19 @@ public void initialize() throws Exception {
      * @return The child file entries.
      */
     private FileEntry[] listFileEntries(final File file, final FileEntry 
entry) {
-        return Stream.of(listFiles(file)).map(f -> createFileEntry(entry, 
f)).toArray(FileEntry[]::new);
+        return Stream.of(listFiles(file, entry)).map(f -> 
createFileEntry(entry, f)).toArray(FileEntry[]::new);
+    }
+
+    /**
+     * Lists the contents of a directory when the parent entry is below the 
maximum depth.
+     *
+     * @param directory The directory to list.
+     * @param entry     The directory entry.
+     * @return The directory contents or a zero length array if the maximum 
depth is reached.
+     */

Review Comment:
   Addressed in 5cde511f8: the Javadoc now states that the directory is listed 
when its own entry is below the maximum depth.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to