RFR: 8320971: Use BufferedInputStream.buf directly when param of implTransferTo() is trusted [v13]
Alan Bateman
alanb at openjdk.org
Wed Dec 13 10:04:46 UTC 2023
On Wed, 13 Dec 2023 09:47:50 GMT, Sergey Tsypanov <stsypanov at openjdk.org> wrote:
> So what is the target package for this utility class?
If you really want a utility class then a non-public class in java.io is okay. However, I think the starting point for this change is not the utility class, it's about deciding whether to relax the check on the target or do nothing. The concerns with BIS and BAIS do overlap but they are not identical. More specifically, for BAIS, the underlying byte[] can outlive the BAIS object. For BIS, transferTo may return a positive value more than once because the underlying stream is growing. These are the details that need to be worked through.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16879#discussion_r1425121886
More information about the core-libs-dev
mailing list