On Tue, 21 Jan 2025 16:00:42 GMT, Daniel Fuchs <[email protected]> wrote:
>> test/jdk/java/net/httpclient/AggregateRequestBodyTest.java line 432:
>>
>>> 430: items.addLast(item);
>>> 431: int available = semaphore.availablePermits();
>>> 432: if (semaphore.availablePermits() > Integer.MAX_VALUE - 8) {
>>
>> In context of reporting the `available` value in the exception message thta
>> gets thrown in the next line, should this check have used the local variable
>> `available` or does it not matter?
>
> Oh! My mistake. I introduced the variable specifically for this, but didn't
> update all the places. Thanks for noticing. Not that it matters much, we
> won't reach Integer.MAX_VALUE - 8 in this test anyway :-)
Fixed in last commit.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23204#discussion_r1924190150