The readValue(...) was trying to read fields of the RMI Stub that may follow the
IOR reference. The stubs, generated by rmic, have no any fields, but the
bug reveals itself with the user-modified stubs.

2005-10-23  Audrius Meskauskas  <[EMAIL PROTECTED]>

       * gnu/javax/rmi/CORBA/gnuRmiUtil.java (readValue):
       Do not read fields of the ObjectImpl.

Index: gnu/javax/rmi/CORBA/gnuRmiUtil.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/javax/rmi/CORBA/gnuRmiUtil.java,v
retrieving revision 1.3
diff -u -r1.3 gnuRmiUtil.java
--- gnu/javax/rmi/CORBA/gnuRmiUtil.java 4 Oct 2005 17:58:15 -0000       1.3
+++ gnu/javax/rmi/CORBA/gnuRmiUtil.java 23 Oct 2005 10:09:40 -0000
@@ -757,6 +757,13 @@
 
     if (object == null)
       object = instantiate(offset, clz, g);
+    
+    // The sentence below prevents attempt to read the internal fields of the
+    // ObjectImpl (or RMI Stub) that might follow the object definition.
+    // Sun's jre 1.5 does not write this information. The stubs, generated
+    // by rmic, does not contain such fields.
+    if (object instanceof ObjectImpl)
+      return object;
 
     if (object instanceof Externalizable)
       {
_______________________________________________
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to