In order to write correct versions of the hashCode and equals method for remote objects that do not extend java.rmi.server.UnicastRemoteObject, the remote object needs to obtain its stub to use for comparison purposes. Therefore,
UnicastRemoteServer.exportObject method should return a RemoteStub, so that the remote object can obtain the stub for the object when it is exported and use that information in the hashCode and equals methods. The exportObject method, in Alpha2, correctly returned RemoteStub.
UnicastRemoteServer.exportObject method should return a RemoteStub, so that the remote object can obtain the stub for the object when it is exported and use that information in the hashCode and equals methods. The exportObject method, in Alpha2, correctly returned RemoteStub.