Hi,
  this is my first patch proposition to classpath. I just have my
paperwork done with FSF and I have created an account on savannah as ojolly.
  Those patches are both dealing with serialization. One deals with the
generation of back reference handle in the output stream which was
forgotten when a proxy was serialized, hence creating an offset in the
back references for further objects while the other deals with the
choice of the construtor to use when deserializing an object. The first
constructor of the first concrete non serializable super class was
selected instead of the first non serializable super class, either
concrete or abstract. It is reported in bugzilla as bug 14144 (
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14144 )
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14144>
  Those patches will make pass 2 dedicated tests in mauve in
java/io/InputOutputStream directory.
  Thanks for the feedback.
Olivier
Index: ObjectInputStream.java
===================================================================
RCS file: /sources/classpath/classpath/java/io/ObjectInputStream.java,v
retrieving revision 1.74
diff -u -r1.74 ObjectInputStream.java
--- ObjectInputStream.java	6 Feb 2006 11:50:46 -0000	1.74
+++ ObjectInputStream.java	12 Feb 2006 15:12:43 -0000
@@ -565,9 +565,8 @@
     if (first_nonserial == null)
       first_nonserial = clazz;
     else
-      while (Serializable.class.isAssignableFrom(first_nonserial)
-	     || Modifier.isAbstract(first_nonserial.getModifiers()))
-	first_nonserial = first_nonserial.getSuperclass();
+      while (Serializable.class.isAssignableFrom(first_nonserial))
+        first_nonserial = first_nonserial.getSuperclass();
 
     final Class local_constructor_class = first_nonserial;
 
Index: ObjectOutputStream.java
===================================================================
RCS file: /sources/classpath/classpath/java/io/ObjectOutputStream.java,v
retrieving revision 1.65
diff -u -r1.65 ObjectOutputStream.java
--- ObjectOutputStream.java	17 Dec 2005 16:29:45 -0000	1.65
+++ ObjectOutputStream.java	12 Feb 2006 15:13:01 -0000
@@ -421,6 +421,8 @@
 	for (int i = 0; i < intfs.length; i++)
 	  realOutput.writeUTF(intfs[i].getName());
 
+        assignNewHandle(osc);
+    
         boolean oldmode = setBlockDataMode(true);
         annotateProxyClass(osc.forClass());
         setBlockDataMode(oldmode);

Reply via email to