[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ozone serialization bug



On Wed, 08 Mar 2000, William Uther wrote:
> Hi,
>   There is a bug in ozone serialization that can cause infinite recursion.
> I think you'll see it anywhere ozone has to read a Hashtable containing key
> objects whose hashCode() methods require accessing another ozone object in
> the same cluster.
> 
>   I have an ozone class that contains a reference to a hashtable.  The keys
> in the hashtable are ozone objects AND their hashCode() method has been
> overridden.  The hashCode() method relies on a reference to an ozone object
> stored in the key object.
Wow, proxies as keys in a hashtable... Of course, it's possible to do so but are
you sure you really need this? This leads to high complexity and maybe
poor performance. Anyway, a hashCode() implementation that calls another
database object is not a good idea in any case. I don't see a way around this
"limitation". Can you explain why this is needed in your app? An object that
relies on another object in its hasCode() method should maybe include this
object...


Falko
-- 
______________________________________________________________________
Falko Braeutigam                         mailto:falko@softwarebuero.de
softwarebuero m&b (SMB)                    http://www.softwarebuero.de