I am using a Collection (a HashMap used indirectly by the JPA, it so happens), but apparently randomly the code throws a ConcurrentModificati
Collection
HashMap
ConcurrentModificati
I ran into this exception when try to remove x last items from list. myList.subList(lastIndex, myList.size()).clear(); was the only solution that worked for me.
myList.subList(lastIndex, myList.size()).clear();