diff --git a/src/share/classes/jdk/net/Sockets.java b/src/share/classes/jdk/net/Sockets.java index ef75631a0c83ef436aca3e24dae361331a451bd7..2b31a1d5727eedd8f1a5888a9f4bce2044c181eb 100644 --- a/src/share/classes/jdk/net/Sockets.java +++ b/src/share/classes/jdk/net/Sockets.java @@ -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);