RFR: 8299015: Ensure that HttpResponse.BodySubscribers.ofFile writes all bytes [v3]
Chris Hegarty
chegar at openjdk.org
Tue Dec 20 12:54:53 UTC 2022
On Tue, 20 Dec 2022 10:48:28 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> Chris Hegarty has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - move into the try
>> - use Math::addExact
>
> src/java.net.http/share/classes/jdk/internal/net/http/common/Utils.java line 671:
>
>> 669: long remain = 0;
>> 670: for (ByteBuffer buf : bufs) {
>> 671: remain = Math.addExact(remain, buf.remaining());
>
> There's another occurrence at line 655
Done.
-------------
PR: https://git.openjdk.org/jdk/pull/11722
More information about the net-dev
mailing list