JDK-8313356 : Improve address selection in sun.net.NetworkClient
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.net
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2023-07-28
  • Updated: 2023-07-31
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.
Other
tbdUnresolved
Related Reports
Relates :  
Description
sun.net.NetworkClient uses `InetSocketAddress(String hostname, int port)` to convert a hostname to an IP address, and then connects to it or fails:

https://github.com/openjdk/jdk/blob/402cb6a550f60c75f93c709b5e5902f3757a8acd/src/java.base/share/classes/sun/net/NetworkClient.java#L177-L183

As described in https://bugs.openjdk.org/browse/JDK-8170568, this preferred approach is to use getAllByName() and a connect() loop. This sub-task tracks fixing NetworkClient to use that approach.
Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/15078 Date: 2023-07-28 22:37:00 +0000
28-07-2023