On Sat, 30 Dec 2023 12:05:22 GMT, Alan Bateman <[email protected]> wrote:
>> Sergey Tsypanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8320971: Fix test
>
> src/java.base/share/classes/java/io/BufferedInputStream.java line 672:
>
>> 670: * <li>does not modify the contents of the {@code byte[]}</li>
>> 671: * <li>{@code OutputStream.write(byte[], int, int)} write does not
>> read the contents outside of the offset/length bounds</li>
>> 672: * </ul>
>
> The implementation change looks fine, just a typo at L671 where it says
> "write write", I think you can shorten this to say that the write method
> doesn't read the contents outside of the offset/length bounds.
Done. Can we somehow modify the test to make it white-box one? Maybe it's
possible to measure memory allocation before and after method invocation in the
way that we could use the difference as a proof of non-allocating invocation
for trusted OutputStreams?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16879#discussion_r1438651570