Mark Wielaard writes: > > While playing a bit with Cajo > (http://wiki.java.net/bin/view/Communications/ProxyUsage) I got the > following error: > > java.lang.NullPointerException > at gnu.cajo.invoke.Remote.hashCode (Remote.java:510) > at java.util.Hashtable.hash (Hashtable.java:822) > at java.util.Hashtable.put (Hashtable.java:432) > at gnu.java.rmi.server.UnicastServer.exportObject (UnicastServer.java:66= > ) > at gnu.java.rmi.server.UnicastServerRef.exportObject (UnicastServerRef.j= > ava:110) > at java.rmi.server.UnicastRemoteObject.exportObject (UnicastRemoteObject= > .java:83) > at java.rmi.server.UnicastRemoteObject.<init> (UnicastRemoteObject.java:= > 69) > at gnu.cajo.invoke.Remote.<init> (Remote.java:486) > at gnu.cajo.utils.ItemServer.bind (ItemServer.java:206) > at ProxyTest.main (ProxyTest.java:38) > > It seems we are to eager to export the Remote object immediately (from > the constructor). We want to put it in a Hashtable and call hasCode(), > but for the cajo Remote object the item field used to calculate the > hashCode() hasn't been set yet so that gives a NullPointerException.
Isn't this a simple failure by gnu.cajo.invoke.Remote to satisfy the contract for hashCode()? As I understand it, hashCode() should not throw any exception. Andrew. _______________________________________________ Classpath mailing list [email protected] http://lists.gnu.org/mailman/listinfo/classpath

