This patch fixes the encoding of IPv6 addresses in the URI provided to ProxySelector.
The original code percent-encoded the square brackets added around the IPv6 addresses, producing URIs that could not be parsed correctly. The proposed code does not percent-encode the IPv6 addresses at all. Added a test to verify that different forms of addresses are processed correctly. The test verifies the handling of IPv4 addresses, IPv6 without scope, IPv6 with numeric scope, IPv6 with textual scope (only if present on the machine running tests), hostnames and FQDNs Tier1-3 tests passed. ------------- Commit messages: - Do not urlencode IPv6 addresses Changes: https://git.openjdk.org/jdk/pull/16265/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16265&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8318130 Stats: 215 lines in 2 files changed: 208 ins; 3 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/16265.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16265/head:pull/16265 PR: https://git.openjdk.org/jdk/pull/16265
