On Mon, 14 Mar 2022 13:21:21 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:
>> 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. Okay, that's fine. ------------- PR: https://git.openjdk.java.net/jdk/pull/7776