From 5c9eb2c7d1faa8b351c11ce034cce52941715d1b Mon Sep 17 00:00:00 2001 From: Stuart Gros-Dubois Date: Thu, 4 Dec 2025 12:23:23 +0100 Subject: [PATCH] Update equality check in HostPort class Updated equality check to handle bracketing of IPv6 addresses. "[fe80:1:2:3::4]" is equal to "fe80:1:2:3::4" --- src/gov/nist/core/HostPort.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gov/nist/core/HostPort.java b/src/gov/nist/core/HostPort.java index 8dec69f1e..f1c3853bc 100755 --- a/src/gov/nist/core/HostPort.java +++ b/src/gov/nist/core/HostPort.java @@ -89,7 +89,7 @@ public boolean equals(Object other) { return false; } HostPort that = (HostPort) other; - return port == that.port && host.equals(that.host); + return port == this.encode().equals(that.encode()); } /** get the Host field