>
>
>>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 )
>>
>>
>
>Strange. I cannot see why we ever wanted to stop on abstract classes.
>The only requirement seems to be that the first non-serial super class
>has a public no-arg constructor (which we indeed check). Maybe we didn't
>use AllocObject in the past. But we do now.
>
>Note that there is still a comment in the file about this:
>
> // find the first non-serializable, non-abstract
> // class in clazz's inheritance hierarchy
>
>That should be changed to say what the code does now.
>And could you add 2006 to the copyright years in both files?
>
>A good ChangeLog entry for this part would be:
>
>2006-02-12 Olivier Jolly <[EMAIL PROTECTED]>
>
> Fixes bug #14144
> * java/io/ObjectInputStream.java (readClassDescriptor):
> Class doesn't have to be abstract for first_nonserial.
>
>If you add Fixes bug #14144 to the CVS commit message (and ChangeLog)
>then cvs will automagically notify bugzilla about the commit related to
>that bug.
>
>
>
Ok. I made the year changes in the copyright and changed the comment to
reflect the new algorithm.
I'd use the changelog you proposed (with date updated) at commit time.
>> Those patches will make pass 2 dedicated tests in mauve in
>>java/io/InputOutputStream directory.
>>
>>
>
>Great. And no regressions I assume.
>
>
>
yes, finally, after hours of struggle with mauve's batch_run and jikes,
I could saw no regression from my own eyes.
I will update the mauve testlet HierarchyTest to make all
compiler-runtime-... combo happy, as discussed on irc.
>Could you report the patches with the suggestions made above and the
>ChangeLog message you want to use. Then I'll add you to the CVS-commit
>list and sent an email about it so you can commit these yourself.
>
>Sorry for the micro-review. Just want to explain everything that goes on
>in detail.
>
>
>
No problem, I prefer doing few but good work, so I really appreciate any
constructive feedback, especially as a classpath newbie.
>Thanks,
>
>Mark
>
>
Regards
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 13 Feb 2006 18:57:08 -0000
@@ -1,5 +1,5 @@
/* ObjectInputStream.java -- Class used to read serialized objects
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006
Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -555,8 +555,7 @@
classLookupTable.put(clazz, osc);
setBlockDataMode(oldmode);
- // find the first non-serializable, non-abstract
- // class in clazz's inheritance hierarchy
+ // find the first non-serializable class in clazz's inheritance hierarchy
Class first_nonserial = clazz.getSuperclass();
// Maybe it is a primitive class, those don't have a super class,
// or Object itself. Otherwise we can keep getting the superclass
@@ -565,9 +564,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 13 Feb 2006 18:56:30 -0000
@@ -1,5 +1,5 @@
/* ObjectOutputStream.java -- Class used to write serialized objects
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -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);