The implementation of IdentityHashMap is not thread-safe, since its
methods are not synchronized.
The iterators returned by the iterator method of IdentityHashMap
are fail-fast. But the fail-fast behavior of an iterator cannot be
guaranteed.
Since the Iterator is fail-fast, it throws
ConcurrentModificationException
baeldung.com/java-identityhashmap#:~:text=IdentityHashMap%20isn't%20threadsafe%2C%20the%20same%20as%20HashMap.