RFR: 8320971: Use BufferedInputStream.buf directly when param of implTransferTo() is trusted [v13]
Markus KARG
duke at openjdk.org
Wed Dec 13 15:32:47 UTC 2023
On Wed, 13 Dec 2023 10:01:30 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> So what is the target package for this utility class?
>
>> 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.
@AlanBateman Why not using com.sun as we did it with other internal classes like ChannelInputStream etc.? Regarding your last sentence actually I do not see what "return a positive value more than once" has to do with the actual changed proposed by this PR?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16879#discussion_r1425523315
More information about the core-libs-dev
mailing list