8250770: Net.java translateToSocketException does not handle IOException

Reviewed-by: alanb, dfuchs
This commit is contained in:
Matthias Baesken 2020-07-29 12:56:02 +02:00
parent 7efa6090e8
commit 11a8c9c13e

View File

@ -185,8 +185,10 @@ public class Net {
nx = new SocketException("Socket is not bound yet");
else if (x instanceof UnsupportedAddressTypeException)
nx = new SocketException("Unsupported address type");
else if (x instanceof UnresolvedAddressException) {
else if (x instanceof UnresolvedAddressException)
nx = new SocketException("Unresolved address");
else if (x instanceof IOException) {
nx = new SocketException(x.getMessage());
}
if (nx != x)
nx.initCause(x);