Jeroen Frijters wrote:

Hi,

Thanks for the patch.

I have one question.



int comp_val =
- real_fields[real_idx].compareTo


(stream_fields[stream_idx]);


+ 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


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.
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

Reply via email to