cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: No memory leak because of Recyclable!
Date Mon, 19 Jan 2004 13:57:44 GMT
Carsten Ziegeler wrote:

>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.
>  
>

Yep. What about a "IdentityStaticBucketMap" that would keep the reduced 
lock contention features of StaticBiucketMap?

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com



Mime
View raw message