classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: Minor RMI-IIOP bug fix.


From: Meskauskas Audrius
Subject: [cp-patches] FYI: Minor RMI-IIOP bug fix.
Date: Sun, 23 Oct 2005 12:34:49 +0200
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

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  <address@hidden>

       * 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)
       {

reply via email to

[Prev in Thread] Current Thread [Next in Thread]