diff options
author | Yuri Nesterenko <yan@openjdk.org> | 2024-01-30 19:48:35 +0400 |
---|---|---|
committer | Vitaly Provodin <vitaly.provodin@jetbrains.com> | 2024-04-20 07:23:13 +0700 |
commit | d9cc5fcdd40dee8cf466636a1d3f84f2504c5902 (patch) | |
tree | 77bff1fa0569fcbc671988513e7c0da9817e039f | |
parent | 5874812b42c0c279bc94abcbbc25e9b93fc07215 (diff) | |
download | JetBrainsRuntime-d9cc5fcdd40dee8cf466636a1d3f84f2504c5902.tar.gz |
8315708: Enhance HTTP/2 client usage
Reviewed-by: mbalao
Backport-of: 4bd9637dfe12d330afd7409c27c5778b28a24cf4
-rw-r--r-- | src/java.net.http/share/classes/jdk/internal/net/http/ConnectionPool.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/java.net.http/share/classes/jdk/internal/net/http/ConnectionPool.java b/src/java.net.http/share/classes/jdk/internal/net/http/ConnectionPool.java index e03dc34e900..265accdbc37 100644 --- a/src/java.net.http/share/classes/jdk/internal/net/http/ConnectionPool.java +++ b/src/java.net.http/share/classes/jdk/internal/net/http/ConnectionPool.java @@ -104,14 +104,10 @@ final class ConnectionPool { return false; } if (secure && destination != null) { - if (destination.getHostName() != null) { - if (!destination.getHostName().equalsIgnoreCase( - other.destination.getHostName())) { - return false; - } - } else { - if (other.destination.getHostName() != null) - return false; + String hostString = destination.getHostString(); + if (hostString == null || !hostString.equalsIgnoreCase( + other.destination.getHostString())) { + return false; } } return true; |