Files
java-interview-lab/lru-cache/output/04-get-is-structural.txt
T

8 lines
356 B
Plaintext

In access-order mode get() is a structural modification (single thread, no concurrency)
=======================================================================================
for (Integer k : accessOrderMap.keySet()) accessOrderMap.get(k);
-> java.util.ConcurrentModificationException
same loop on an insertion-order LinkedHashMap -> completes normally