On Sat, 16 Dec 2023 08:56:16 GMT, Markus KARG <d...@openjdk.org> wrote:

>> test/jdk/java/io/SequenceInputStream/TransferTo.java line 160:
>> 
>>> 158:                 pos++;
>>> 159:                 return b;
>>> 160:             }
>> 
>> To trigger the problematic case, we need to transfer more than 
>> `Long.MAX_VALUE`. `Integer.MAX_VALUE` is not enough, and we need nearly 
>> `Integer.MAX_VALUE * Integer.MAX_VALUE` bytes to trigger the problematic 
>> case which might take noticeable time.
>> 
>> I think the easiest way would be overriding `transferTo(...)` in a mock 
>> `InputStream` so it returns `Long.MAX_VALUE`, and adding that stream in a 
>> sequence.
>
> I know and the solution is already in progress (see my last comment from 
> yesterday). Stay tuned.

Done, see 
https://github.com/openjdk/jdk/pull/17119/commits/556a8dc4d3d8ff157e8374625eb129a08926e0dd.
 :-)

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17119#discussion_r1428818440

Reply via email to