JDK-8248328 : Release Note: Filtering and Ordering of Addresses Returned by Alternative Hosts File Name Service Provider
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 15
  • Priority: P4
  • Status: Closed
  • Resolution: Delivered
  • Submitted: 2020-06-25
  • Updated: 2021-05-14
  • Resolved: 2021-05-14
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 15
15Resolved
Description
In this release, the behavior of `InetAddress.getAllByName` has been modified when the alternative hosts file name service is selected .

The JDK allows specifying an alternative host's file name service by using the `jdk.net.hosts.file` system property. The implementation of the alternative name service has been changed to take into account the values of the `java.net.preferIPv4Stack` and `java.net.preferIPv6Addresses` system properties. This affects the results returned by `InetAddress.getAllByName` when the host's file name service is selected.
For details about `java.net.preferIPv4Stack` and `java.net.preferIPv6Addresses`, see [Networking Properties](https://docs.oracle.com/en/java/javase/14/docs/api/java.base/java/net/doc-files/net-properties.html) in the API documentation.