On Thu, 30 Nov 2023 08:58:18 GMT, Sergey Tsypanov <stsypa...@openjdk.org> wrote:
>> It looks like we can skip copying of `byte[]` in >> `BufferedInputStream.implTransferTo()` for `OutputStreams` residing in >> `java.io`. >> >> See comment by @vlsi in >> https://github.com/openjdk/jdk/pull/10525/files#diff-e19c508d1bb6ee78697ecca66947c395adda0d9c49a85bf696e677ecbd977af1R612 > > Sergey Tsypanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8320971: Trust any OutputStream from java.* Did you review if all Java.* streams are safe? There are a few stream adapters in sun.nio.ch, which would benefit this optimization too, unfortunately they wrap the arrays with ByteBuffer.wrap, I guess that’s not safe, so the package can’t be allowed? ------------- PR Comment: https://git.openjdk.org/jdk/pull/16879#issuecomment-1833404968