cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From volker.schm...@basf-it-services.com
Subject Re: Re: Calculating the cache key
Date Wed, 29 May 2002 07:37:02 GMT




>>sorry, but I don\'t understand why the resultant
>>hashCode should not an even
>>number. My understanding of a hashCode funktion is,
>>that it should generate
>>homogeneous values.
>
>Yes, but the default hashCode function generates even numbers. So in order to
recieve more balance when you mix >your objects with objects using the default
hashCode, your hashCodes should be uneven.
>
>If you don\'t intend to mix, your hash codes should be evenly distributed.
>
>Personally, I think this is a \"bug\" or at least an undesired feature in Java.
The method \"hashCode()\" should >naturally return evenly distributed numbers,
both even and uneven.


Ok, I understand, but if we are sure that we do not mix like in the Cocoon
caching engine I think it is better to generate homogeneous values.

Volker



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message