Project

General

Profile

Revision c844706d

IDc844706d008aa285c195a7e79422fc205be52b15
Parent 62661acc
Child 5b336515

Added by Andreas Müller about 1 month ago

fix possible concurrent modification exception

View differences:

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;
9 8
import java.util.List;
10 9
import java.util.Set;
11 10

  
......
147 146
	 */
148 147
	@Override
149 148
    public void removeElements(){
150
        for (Iterator<ICdmFormElement> iterator = getElements().iterator();iterator.hasNext();) {
151
            ICdmFormElement childElement = iterator.next();
152
			// recursion
149
	    Set<ICdmFormElement> tmpElements = new HashSet<>(getElements());
150
        for (ICdmFormElement childElement : tmpElements) {
151
            // recursion
153 152
			childElement.removeElements();
154 153

  
155 154
			// unregister selection arbitrator

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)