RFR: 8374819: Some I/O streams left unclosed
Alexey Semenyuk
asemenyuk at openjdk.org
Thu Jan 8 18:52:39 UTC 2026
On Mon, 29 Dec 2025 23:29:11 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:
> - Replace `Files.newInputStream(path)` in chain method calls with either `new ByteArrayInputStream(Files.readAllBytes(path))` or `path.toFile()` if there is an alternative method taking a `File` instance instead of an `InputStream` and if appropriate.
> - Add missing try-with-resources for `Class.getResourceAsStream()` calls.
@sashamatveev PTAL
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29007#issuecomment-3725191843
More information about the core-libs-dev
mailing list