[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Classpath] Bug in Double.java
From: |
Eric Blake |
Subject: |
RE: [Classpath] Bug in Double.java |
Date: |
Mon, 16 Jul 2001 18:24:51 +0100 |
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
address@hidden tel:+44(0)117 917 5611
> -----Original Message-----
> From: address@hidden [mailto:address@hidden 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