Re: serialization oddity in Alias

Date view Thread view Subject view Author view

From: Tim Wilkinson (tim@transvirtual.com)
Date: Wed Feb 10 1999 - 16:54:42 EST


Yup - that sums it up nicely. The strings in questions are the names of
class fields (part of the CLASSDESC) and I will check that the JDK is happy
about this.

Tim

Godmar Back wrote:

> Let me see if I understand this:
>
> Inside the serialization stream, two strings with identical content
> are serialized. Kaffe interns them, so it writes out the first, and
> puts a token that refers to it in place of the second.
>
> Sun, on the other hand, writes out both because the strings happen
> to be not interned in their VM, and hence they don't use a token
> to refer to the earlier identical string in the stream.
>
> Does that describe the situation somewhat accurately or is this
> totally off base? I'd say there's no problem if it does.
>
> Did you check whether Sun can read the stream as emitted by
> kaffe and vice versa?
>
> - Godmar
>
> >
> > We appear to have a rather odd bug in serialization which is shown up by
> > Alias. While Alias works fine but is serial format is 2 bytes shorter
> > than JDK. Turns out that this is because we're interning the strings
> > and they happen to match.
> >
> > So both answer are right and compatible - but the serialization form is
> > different though both kaffe and jdk should be able to handle both forms.
> > I'm going to consider the interned form we use to be 'correct'.
> >
> > Isn't compatibility wonderful?
> >
> > Tim
> >
> > --
> > Tim Wilkinson Tel: +1 510 704 1660
> > Transvirtual Technologies, Inc., Fax: +1 510 704 1893
> > Berkeley, CA, USA. Email: tim@transvirtual.com
> >
> >
> >
> >

--
  Tim Wilkinson                         Tel:     +1 510 704 1660
  Transvirtual Technologies, Inc.,      Fax:     +1 510 704 1893
  Berkeley, CA, USA.                    Email:   tim@transvirtual.com


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:58:05 EDT