That's what I wanted to know.  If you look at the patch I submitted, I had
already added a readObject() method, and wanted to make sure it would work
as I was expecting.

--
Eric Blake, Elixent, Castlemead, Lwr Castle St., Bristol BS1 3AG, UK
[EMAIL PROTECTED]   tel:+44(0)117 917 5611


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
> Of Jochen Hoenicke
> Sent: 16 July 2001 18:13
> To: Eric Blake
> Cc: classpath
> Subject: Re: [Classpath] Bug in Double.java
>
>
> On Jul 16, C. Scott Ananian wrote:
> >
> > Fields marked transient are *defined* to be reset to zero after
> > deserialization.  Use 0 as your non-cached value; the only
> "harm" will be
> > that hashCode will have the same performance as the non-caching version
> > for Double(0) -- it's still better than not caching at all.
>
> Another possibility is to add a readObject method, that just calls
> defaultReadObject() and initializes the transient fields to correct
> values.  See Classpath's implementation of java.util.Locale as an
> example.
>
>   Jochen


_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to