JDK-8223737 : HostsFileNameService doesn't handle IPv6 literal addresses correctly
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-05-11
  • Updated: 2024-06-11
  • Resolved: 2019-05-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 13
13 b21Fixed
Description
For example, ::1 and 0:0:0:0:0:0:0:1 should yield the same output.

The system property `jdk.net.hosts.file` can be defined to effect InetAddress name and address resolution calls, i.e getByXXX. The value of the system property is a filename that contains the mappings. The structure of this file is equivalent to that of the /etc/hosts file.

For example:
  10.2.3.4  testHost.testDomain
  ::1     ip6-localhost ip6-loopback

Comments
Current Jira is a real JDK code change, it is the dependency of JDK-8314517, which is a test case backport So add this real JDK change to OpenJDK 11 for a test case is not a good idea, if the current JDK-8223737 itself is not required. So I will close the PR https://git.openjdk.org/jdk11u-dev/pull/2683
11-06-2024

[11u] No reason, no risk assesment. Removing Label.
02-05-2024

[jdk11u-fix-request] Approval Request from Amos "Clean backport. SAP nightlies passed on 2024-04-27. Tested passed in local machine MacOS 14.4.1”
28-04-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk11u-dev/pull/2683 Date: 2024-04-26 00:11:51 +0000
26-04-2024

commit https://github.com/openjdk/jdk/commit/23301277c56eff451a6ed7c50d635377d60d8a22 Author: Arthur Eubanks <aeubanks@google.com> Date: Fri May 10 17:13:02 2019 -0700
25-04-2024

URL: http://hg.openjdk.java.net/jdk/jdk/rev/4ee117b890c5 User: jiangli Date: 2019-05-15 16:14:32 +0000
15-05-2019