Skip to content

Commit fae4dd3

Browse files
author
Gary Gregory
committed
Use lambdas.
1 parent 2108506 commit fae4dd3

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -841,12 +841,7 @@ private static boolean overrideReadOnly(final DeleteOption... deleteOptions) {
841841
if (deleteOptions == null) {
842842
return false;
843843
}
844-
for (final DeleteOption deleteOption : deleteOptions) {
845-
if (deleteOption == StandardDeleteOption.OVERRIDE_READ_ONLY) {
846-
return true;
847-
}
848-
}
849-
return false;
844+
return Stream.of(deleteOptions).anyMatch(e -> e == StandardDeleteOption.OVERRIDE_READ_ONLY);
850845
}
851846

852847
/**

0 commit comments

Comments
 (0)