diff --git a/src/share/classes/sun/rmi/transport/tcp/TCPTransport.java b/src/share/classes/sun/rmi/transport/tcp/TCPTransport.java index e2b9841c11be62ebd7325ddaebb4f9b69fc8f419..8b523df9c383bf3d7f3a19c49425a8b53df46109 100644 --- a/src/share/classes/sun/rmi/transport/tcp/TCPTransport.java +++ b/src/share/classes/sun/rmi/transport/tcp/TCPTransport.java @@ -28,6 +28,7 @@ import java.lang.ref.Reference; import java.lang.ref.SoftReference; import java.lang.ref.WeakReference; import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.UndeclaredThrowableException; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; @@ -462,8 +463,10 @@ public class TCPTransport extends Transport { return; } // continue loop - } else { + } else if (t instanceof Error) { throw (Error) t; + } else { + throw new UndeclaredThrowableException(t); } } }