*/\r
package eu.etaxonomy.taxeditor.ui.element;\r
\r
+import java.util.ArrayList;\r
import java.util.ConcurrentModificationException;\r
import java.util.HashSet;\r
import java.util.List;\r
public void firePropertyChangeEvent(CdmPropertyChangeEvent event) {\r
//TODO: replace propertyChangeListeners with formFactory.getPropertyChangeListeners() and remove member propertyChangeListeners from AbstractCdmFormElement\r
Assert.isNotNull(propertyChangeListeners, "Property change listeners are not present");\r
-\r
+ List<IPropertyChangeListener> temp = new ArrayList<>();\r
+ for (Object listener :propertyChangeListeners) {\r
+ temp.add((IPropertyChangeListener)listener);\r
+ }\r
try{\r
- for(Object listener : propertyChangeListeners){\r
+ for(Object listener : temp){\r
((IPropertyChangeListener)listener).propertyChange(event);\r
}\r
}catch(ConcurrentModificationException e){\r
// and here: http://dev.e-taxonomy.eu/trac/ticket/2438\r
// Ignoring the CME because nothing bad is happening\r
MessagingUtils.warn(getClass(), "ConcurrentModificationException. Can be ignored.");\r
+ e.printStackTrace();\r
}\r
+ temp = null;\r
}\r
\r
/**\r