Revision c7b20ed3
Added by Patrick Plitzner over 5 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractCdmFormElement.java | ||
---|---|---|
5 | 5 |
|
6 | 6 |
import java.util.ConcurrentModificationException; |
7 | 7 |
import java.util.HashSet; |
8 |
import java.util.Iterator; |
|
8 | 9 |
import java.util.List; |
9 | 10 |
import java.util.Set; |
10 | 11 |
|
... | ... | |
144 | 145 |
*/ |
145 | 146 |
@Override |
146 | 147 |
public void removeElements(){ |
147 |
for(ICdmFormElement childElement : getElements()){ |
|
148 |
for (Iterator<ICdmFormElement> iterator = getElements().iterator();iterator.hasNext();) { |
|
149 |
ICdmFormElement childElement = iterator.next(); |
|
148 | 150 |
// recursion |
149 | 151 |
childElement.removeElements(); |
150 | 152 |
|
Also available in: Unified diff
fix #7665 Use iterator to avoid ConcurrentModificationException