Skip to content

Commit 63da0aa

Browse files
committed
Migrate from deprecated API
1 parent 04cac4a commit 63da0aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/apache/commons/io/file/PathUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1956,8 +1956,8 @@ public static boolean waitFor(final Path file, final Duration timeout, final Lin
19561956
@SuppressWarnings("resource") // Caller closes
19571957
public static Stream<Path> walk(final Path start, final PathFilter pathFilter, final int maxDepth, final boolean readAttributes,
19581958
final FileVisitOption... options) throws IOException {
1959-
return Files.walk(start, maxDepth, options)
1960-
.filter(path -> pathFilter.accept(path, readAttributes ? readBasicFileAttributesUnchecked(path) : null) == FileVisitResult.CONTINUE);
1959+
return Files.walk(start, maxDepth, options).filter(
1960+
path -> pathFilter.accept(path, readAttributes ? readBasicFileAttributes(path, EMPTY_LINK_OPTION_ARRAY) : null) == FileVisitResult.CONTINUE);
19611961
}
19621962

19631963
private static <R> R withPosixFileAttributes(final Path path, final LinkOption[] linkOptions, final boolean overrideReadOnly,

0 commit comments

Comments
 (0)