-
Bug
-
Resolution: Fixed
-
P2
-
24
-
b03
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8346518 | 24 | Volkan Yazici | P2 | Closed | Fixed | b29 |
As the title says, Socket::connect is not specified to throw UnknownHostException when called with an unresolved address.
This is a problem when the Socket was created with a SOCKS proxy (V5 SOCKS supports the passing of an unresolved address (e.g. an Tor .onion address) to the SOCKS server for resolution).
REGRESSION : Last worked in version 17
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a Socket with a SOCKS proxy and address to connect to an unresolved address
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
It works as before
ACTUAL -
An UnknownHost exception is thrown
---------- BEGIN SOURCE ----------
Proxy proxy = new Proxy( Proxy.Type.SOCKS, new InetSocketAddress( "127.0.0.1", 1234 ));
InetSocketAddress address = InetSocketAddress.createUnresolved( "www.google.com", 443 );
Socket socket = new Socket( proxy );
socket.connect( address );
---------- END SOURCE ----------
FREQUENCY : always
- backported by
-
JDK-8346518 Socket.connect specified to throw UHE for unresolved address is problematic for SOCKS V5 proxy
- Closed
- csr for
-
JDK-8346204 Socket.connect specified to throw UHE for unresolved address is problematic for SOCKS V5 proxy
- Closed
- relates to
-
JDK-8343791 Socket.connect API should document whether the socket will be closed when hostname resolution fails or another error occurs
- Closed
- links to
-
Commit(jdk24) openjdk/jdk/b8249c5d
-
Commit(master) openjdk/jdk/9e8aa855
-
Review(jdk24) openjdk/jdk/22809
-
Review(master) openjdk/jdk/22719