On Mon, 29 Dec 2025 23:29:11 GMT, Alexey Semenyuk <[email protected]> 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.
src/jdk.jpackage/share/classes/jdk/jpackage/internal/AppImageFile.java line 167:
> 165: try {
> 166: final Document doc = XmlUtils.initDocumentBuilder().parse(
> 167: new
> ByteArrayInputStream(Files.readAllBytes(appImageFilePath)));
would `.parse(appImageFilePath.toFile())` also work?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29007#discussion_r2673644925