RFR: 8254786: java/net/httpclient/CancelRequestTest.java failing intermittently [v3]
Daniel Fuchs
dfuchs at openjdk.java.net
Mon Mar 14 13:24:43 UTC 2022
On Mon, 14 Mar 2022 10:04:13 GMT, Michael McMahon <michaelm at openjdk.org> wrote:
>> Daniel Fuchs has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Copyright years
>
> src/java.net.http/share/classes/jdk/internal/net/http/Http2ClientImpl.java line 155:
>
>> 153: boolean offerConnection(Http2Connection c) {
>> 154: if (debug.on()) debug.log("offering to the connection pool: %s", c);
>> 155: if (!c.isOpen() || c.finalStream()) {
>
> Is this check for isOpen() not redundant given the same check added inside the synchronized block?
Possibly - but it allows to break out fast without having to enter the synchronized block.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7776
More information about the net-dev
mailing list