You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/10/06 00:53:53 UTC
[commons-io] branch master updated: Use Java 8 APIs
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git
The following commit(s) were added to refs/heads/master by this push:
new 4672c22e Use Java 8 APIs
4672c22e is described below
commit 4672c22ef2976d5d890dc9e9941fd984987cc15a
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Oct 5 20:53:47 2022 -0400
Use Java 8 APIs
---
.../java/org/apache/commons/io/monitor/FileAlterationObserver.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/commons/io/monitor/FileAlterationObserver.java b/src/main/java/org/apache/commons/io/monitor/FileAlterationObserver.java
index c05c18f5..426f4c41 100644
--- a/src/main/java/org/apache/commons/io/monitor/FileAlterationObserver.java
+++ b/src/main/java/org/apache/commons/io/monitor/FileAlterationObserver.java
@@ -343,9 +343,7 @@ public class FileAlterationObserver implements Serializable {
private FileEntry[] doListFiles(final File file, final FileEntry entry) {
final File[] files = listFiles(file);
final FileEntry[] children = files.length > 0 ? new FileEntry[files.length] : FileEntry.EMPTY_FILE_ENTRY_ARRAY;
- for (int i = 0; i < files.length; i++) {
- children[i] = createFileEntry(entry, files[i]);
- }
+ Arrays.setAll(children, i -> createFileEntry(entry, files[i]));
return children;
}