Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
pwinckles committed Mar 3, 2024
1 parent 403e4eb commit 0f8cece
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ocfl-java-core/src/main/java/io/ocfl/core/util/FileUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,7 @@ public static void deleteChildren(Path root) {
*/
public static void deleteEmptyDirs(Path root) {
try (var files = Files.find(root, Integer.MAX_VALUE, (file, attrs) -> attrs.isDirectory())) {
files.filter(f -> !f.equals(root))
.sorted(Comparator.reverseOrder())
.forEach(FileUtil::deleteDirIfEmpty);
files.filter(f -> !f.equals(root)).sorted(Comparator.reverseOrder()).forEach(FileUtil::deleteDirIfEmpty);
} catch (NoSuchFileException e) {
// ignore
} catch (IOException e) {
Expand Down

0 comments on commit 0f8cece

Please sign in to comment.