The Sun's implementation throws java.rmi.ConnectException (subclass of
RemoteException) in the case of failure to establish the connection. Our
implementation throws the RemoteException itself. This crashes
applications that specifically catch ConnectException. In Classpath,
this exception is thrown from gnu/java/rmi/server/UnicastRef.java
(newCall).
2006-01-13 Audrius Meskauskas <[EMAIL PROTECTED]>
* gnu/java/rmi/server/UnicastRef.java (newCall):
Throw ConnectException after catching IOException.
Index: gnu/java/rmi/server/UnicastRef.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/java/rmi/server/UnicastRef.java,v
retrieving revision 1.8
diff -u -r1.8 UnicastRef.java
--- gnu/java/rmi/server/UnicastRef.java 2 Jul 2005 20:32:14 -0000 1.8
+++ gnu/java/rmi/server/UnicastRef.java 13 Jan 2006 04:12:32 -0000
@@ -47,6 +47,7 @@
import java.io.ObjectOutputStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import java.rmi.ConnectException;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.rmi.server.ObjID;
@@ -195,7 +196,7 @@
conn = manager.getConnection();
}
catch (IOException e1) {
- throw new RemoteException("connection failed to host: " +
manager.serverName, e1);
+ throw new ConnectException("connection failed to host: " +
manager.serverName, e1);
}
//obj: useless?
_______________________________________________
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches