en passant: is IndexingObjectStore safe?
Tom Zeller
tzeller at dragonacea.biz
Wed Jan 15 11:24:03 EST 2014
> The Javadoc includes this documented assumption:
>
>> Therefore this store should never be
>> used to store objects that produce identical hash codes but are not functionally identical objects.
>
> In other words, if there are two objects which have different hashes, they had better have identical functionality or IndexedObjectStore will Do The Wrong Thing.
My logic-fu is weak this morning, but if two objects' hashCode()
methods return different ints, then yes, the IndexingObjectStore will
not optimize storage, but that is not really The Wrong Thing, AFAIK.
Wondering if you are conflating hash with hashCode().
More information about the dev
mailing list