On Mon, 22 Apr 2024 19:49:44 GMT, Brian Burkhalter <[email protected]> wrote:
>> Prevent blocking due to a carrier thread not being released when
>> `ByteArrayOutputStream.writeTo` is invoked from a virtual thread.
>
> Brian Burkhalter has updated the pull request incrementally with one
> additional commit since the last revision:
>
> Correct ID in test @bug tag
src/java.base/share/classes/java/io/ByteArrayOutputStream.java line 164:
> 162: public void writeTo(OutputStream out) throws IOException {
> 163: if (Thread.currentThread().isVirtual()) {
> 164: out.write(toByteArray());
Would it be better to avoid calling a public method `toByteArray` encase
subclass is overriding it?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18901#discussion_r1576078358