eclipse-jdt / eclipse-jdt/eclipse.jdt.core
False potential resource leak for `java.nio.file.Files.walk(Path, int, FileVisitOption...)`
Open
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 47
Description
Following code reports:
> Potential resource leak: '\' may not be closed
```java
import java.nio.file.Files;
@Override
public Stream oldestKeys() {
try {
return Files.walk(hashedDir, 1).map(Path::getFileName).map(Path::toString);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.