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

Reply via email to