usethesource / capsule

The Capsule Hash Trie Collections Library
BSD 2-Clause "Simplified" License
404 stars 27 forks source link

Hash Collision in the PersistentTrieSetMultimap can cause equality issues #16

Closed DavyLandman closed 7 years ago

DavyLandman commented 7 years ago

I've had some big data structures that when printing looked the same, yet equals was saying they weren't.

After quite some stepping I found it out.

PersistentTrieSetMultimap$HashCollisionNode is missing it's own equals method that goes through the collisionContent collection of itself and the other to see if they might be the same collision node. Instead it defaults to the Object.equals which is reference equality.

We are (still?) on capsule 0.3.0, if possible I would appreciate a bug fix release :)