I had a foreach loop that iterates through an arraylist.
In the body of the for loop I have an if condition which removes the current item from the list.
for (item in mylist){
    if(some condition is met)
        mylist.remove(mylist.indexOf(item))
}
But this is causing a java.util.ConcurrentModificationException to be thrown, is it illegal to do this in groovy, and if so how can i get past this?
 
     
     
    