On Fri, 26 Feb 2021 20:21:21 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:
>> src/java.desktop/unix/classes/sun/print/UnixPrintJob.java line 601: >> >>> 599: try (BufferedInputStream bin = new >>> BufferedInputStream(instream); >>> 600: BufferedOutputStream bout = new >>> BufferedOutputStream(output)) { >>> 601: bin.transferTo(bout); >> >> https://docs.oracle.com/en/java/javase/15/docs/api/java.base/java/io/InputStream.html#transferTo(java.io.OutputStream) >> >> This method does not close either stream. >> >> --- >> >> So this doesn't look right. > > The method itself does not close it, but the "try-with-res" around it should. ah yes ------------- PR: https://git.openjdk.java.net/jdk/pull/1856