RFR: 8348108: Race condition in AggregatePublisher.AggregateSubscription [v2]
Daniel Fuchs
dfuchs at openjdk.org
Tue Jan 21 18:26:42 UTC 2025
On Tue, 21 Jan 2025 16:00:42 GMT, Daniel Fuchs <dfuchs at openjdk.org> 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
More information about the net-dev
mailing list