HashMap\'s javadoc states:
if the map is structurally modified at any time after the iterator is created, in any way except through the iterator\'s own re
As a side note, ConcurrentModificationException
(despite the unfortunate name) is not intended to detect modification across multiple threads. it is only intended to catch modifications within a single thread. the effects of modifying a shared HashMap across multiple threads (without correct synchronization) are guaranteed to be broken regardless of the use of iterators or anything else.
In short, your test is bogus regardless of the jvm version and it is only "luck" that it does anything different at all. for example, this test could throw NPE or some other "impossible" exception due to the HashMap internals being in an inconsistent state when viewed cross thread.