mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8250770: Net.java translateToSocketException does not handle IOException
Reviewed-by: alanb, dfuchs
This commit is contained in:
parent
7efa6090e8
commit
11a8c9c13e
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue