RFR: 8320971: Use BufferedInputStream.buf directly when param of implTransferTo() is trusted
Alan Bateman
alanb at openjdk.org
Wed Nov 29 20:23:04 UTC 2023
On Wed, 29 Nov 2023 20:07:37 GMT, Vladimir Sitnikov <vsitnikov at openjdk.org> wrote:
> The buffer in question is protected, so any subclass can directly access it. In other words, untrusted code can easily acoess the buffer, and it does not sound fair to add extra overhead to the method which was created for the performance reasons.
If something extends BIS then it has access to the protected fields, this isn't a concern here. Instead, the concern is about passing a reference to the target output stream.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16879#discussion_r1409822279
More information about the core-libs-dev
mailing list