Closed
Description
Sebb (Bug 53277):
The HashTree class currently uses a HashMap to store test elements.
Now a HashMap cannot store two Objects which compare equal and have the same hash code. Test elements currently use the system hash code, so collisions are unlikely; however they are not impossible. It's quite easy to create multiple test elements which compare equal.
So there is a risk that a new element which is added to the HashTree could displace an existing entry.
One solution to this is to use IdentityHashMap instead of HashMap; this uses == rather than equals when comparing elements.
OS: All