cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: No memory leak because of Recyclable!
Date Mon, 19 Jan 2004 13:38:40 GMT
Sylvain Wallez wrote:
>
> I haven't followed all the discussion, but why is toString() used to
> identify components?
I have asked the same question :) And didn't get any answer :(

> Wouldn't it be better to use a Map keyed by the
> identy of the object like java.util.IdentityHashMap()? That way, we
> ensure there's no possible collision between two instances of the same
> component, and also avoid any problem related to classes redefining
> their own hashcode() and equals() methods.
>
Yupp. As we learn from Lars, using toString() is not secure!

So, we should change the use of the StaticBucketMap to a safer
implementation
and remove these toString() calls in Excalibur component.

Carsten


Mime
View raw message