Files.walk() is misused. It is used just as `Files.walk(...)`, however to avoid resource leak it should be used as:
try (var paths = Files.walk()) {
paths...
}
Need to wrap all Files.walk() calls in try-with-resource statements.
try (var paths = Files.walk()) {
paths...
}
Need to wrap all Files.walk() calls in try-with-resource statements.