Hi,Right. I've forgotten this problem. This was introduced to fix a specific problem when you have inconsistencies between the field descriptors from the stream and from the class definition.
Thanks for the patch.
I have one question.
int comp_val =(stream_fields[stream_idx]);
- real_fields[real_idx].compareTo
+ real_fields[real_idx].getName().compareTo(stream_fields[stream_idx].getName());
By my reading of the spec, primitive fields are written before reference
fields, it's not simply sorted by name. See
http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/class.doc3.ht
ml
For example, if you have:
class A { String x; }
and in the stream you have 'int x' the former behaviour was not able to detect the inconsistency and was creating a new duplicate field 'int x'.
So maybe we should check this before the main loop by first comparing fields by name and then merging the two tables.
Regards, Guilhem.
_______________________________________________ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath