cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
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.


To unsubscribe, e-mail:
For additional commands, email:

View raw message