提交 a864e638 编写于 作者: M michaelm

8047186: jdk.net.Sockets throws InvocationTargetException instead of original runtime exceptions

Reviewed-by: michaelm
Contributed-by: artem.smotrakov@oracle.com
上级 354aeeaf
......@@ -119,6 +119,8 @@ public class Sockets {
Throwable t = ((InvocationTargetException)e).getTargetException();
if (t instanceof IOException) {
throw (IOException)t;
} else if (t instanceof RuntimeException) {
throw (RuntimeException)t;
}
}
throw new RuntimeException(e);
......@@ -135,6 +137,8 @@ public class Sockets {
Throwable t = ((InvocationTargetException)e).getTargetException();
if (t instanceof IOException) {
throw (IOException)t;
} else if (t instanceof RuntimeException) {
throw (RuntimeException)t;
}
}
throw new RuntimeException(e);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册