From cd7628518771d3756643116959fa3685ac295790 Mon Sep 17 00:00:00 2001 From: dmocek Date: Thu, 2 Aug 2012 18:12:18 -0700 Subject: [PATCH] 7187876: ClassCastException in TCPTransport.executeAcceptLoop Reviewed-by: dholmes, smarks --- src/share/classes/sun/rmi/transport/tcp/TCPTransport.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/share/classes/sun/rmi/transport/tcp/TCPTransport.java b/src/share/classes/sun/rmi/transport/tcp/TCPTransport.java index e2b9841c1..8b523df9c 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); } } } -- GitLab