Here comes a fix for UnicastRemoteObject.exportObject(Remote). This
method used to do strange things, including a cast from the argument to
RemoteObject, which my application here did not like (because it was not
an instance of RemoteObject that was passed as argument). It occured to
me that the fix would be to forward this to exportObject(Remote,0),
which made my application happy. Committed as follows:
2006-02-13 Roman Kennke <[EMAIL PROTECTED]>
* java/rmi/server/UnicastRemoteObject.java
(exportObject(Remote)): Forward method call to export(Remote,int).
/Roman
Index: java/rmi/server/UnicastRemoteObject.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/rmi/server/UnicastRemoteObject.java,v
retrieving revision 1.10
diff -u -r1.10 UnicastRemoteObject.java
--- java/rmi/server/UnicastRemoteObject.java 2 Jul 2005 20:32:40 -0000 1.10
+++ java/rmi/server/UnicastRemoteObject.java 13 Feb 2006 17:00:22 -0000
@@ -79,8 +79,7 @@
}
public static RemoteStub exportObject(Remote obj) throws RemoteException {
- UnicastServerRef sref = (UnicastServerRef)((RemoteObject)obj).getRef();
- return (sref.exportObject(obj));
+ return (RemoteStub) exportObject(obj, 0);
}
public static Remote exportObject(Remote obj, int port) throws RemoteException