Hi Audrius,

Can you please take a look at this patch?

The current ActivatableRef (de)serialization code is wrong (the format
is documented here [1]) and I fixed the common case, but I don't
understand what a "null nested remote reference" is.

Thanks,
Jeroen

[1]
http://java.sun.com/j2se/1.5.0/docs/api/serialized-form.html#java.rmi.se
rver.RemoteObject

Index: gnu/java/rmi/server/ActivatableRef.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/gnu/java/rmi/server/ActivatableRef.java,v
retrieving revision 1.1
diff -u -r1.1 ActivatableRef.java
--- gnu/java/rmi/server/ActivatableRef.java     29 Mar 2006 13:10:10
-0000   1.1
+++ gnu/java/rmi/server/ActivatableRef.java     13 Sep 2006 05:34:18
-0000
@@ -112,8 +112,10 @@
   public void readExternal(ObjectInput in) throws IOException,
       ClassNotFoundException
   {
-    super.readExternal(in);
     actId = (ActivationID) in.readObject();
+    String type = in.readUTF();
+    // XXX handle type.equals("") (null reference)
+    super.readExternal(in);
   }
 
   /**
@@ -121,8 +123,10 @@
    */
   public void writeExternal(ObjectOutput out) throws IOException
   {
-    super.writeExternal(out);
     out.writeObject(actId);
+    // XXX write a "" if the "nested" reference is a null reference
+    out.writeUTF("UnicastRef2");
+    super.writeExternal(out);
   }
   
   /**

Reply via email to