Revision 707b6237
Added by Niels Hoffmann over 12 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/AbstractCdmFormElement.java | ||
---|---|---|
3 | 3 |
*/ |
4 | 4 |
package eu.etaxonomy.taxeditor.ui.forms; |
5 | 5 |
|
6 |
import java.util.ConcurrentModificationException; |
|
6 | 7 |
import java.util.HashSet; |
7 | 8 |
import java.util.List; |
8 | 9 |
import java.util.Set; |
... | ... | |
233 | 234 |
/** {@inheritDoc} */ |
234 | 235 |
public void firePropertyChangeEvent(CdmPropertyChangeEvent event) { |
235 | 236 |
Assert.isNotNull(propertyChangeListeners, "Property change listeners are not present"); |
236 |
for(Object listener : propertyChangeListeners){ |
|
237 |
((IPropertyChangeListener)listener).propertyChange(event); |
|
237 |
|
|
238 |
try{ |
|
239 |
for(Object listener : propertyChangeListeners){ |
|
240 |
((IPropertyChangeListener)listener).propertyChange(event); |
|
241 |
} |
|
242 |
}catch(ConcurrentModificationException e){ |
|
243 |
// There are two cases that produce a CME. |
|
244 |
// Described here: http://dev.e-taxonomy.eu/trac/ticket/2363#comment:2 |
|
245 |
// and here: http://dev.e-taxonomy.eu/trac/ticket/2438 |
|
246 |
// Ignoring the CME because nothing bad is happening |
|
247 |
StoreUtil.warn(getClass(), "ConcurrentModificationException. Can be ignored."); |
|
238 | 248 |
} |
239 | 249 |
} |
240 | 250 |
|
251 |
/** |
|
252 |
* Fires a {@link CdmPropertyChangeEvent} with the given object as source. |
|
253 |
* |
|
254 |
* @param object the object on which the property changed |
|
255 |
*/ |
|
256 |
public void firePropertyChangeEvent(Object object){ |
|
257 |
firePropertyChangeEvent(object, null); |
|
258 |
} |
|
259 |
|
|
260 |
/** |
|
261 |
* Fires a {@link CdmPropertyChangeEvent} with the given object as source also containing the |
|
262 |
* originating event |
|
263 |
* |
|
264 |
* @param object the object on which the property changed |
|
265 |
* @param originatingEvent the originating event |
|
266 |
*/ |
|
267 |
public void firePropertyChangeEvent(Object object, PropertyChangeEvent originatingEvent){ |
|
268 |
firePropertyChangeEvent(new CdmPropertyChangeEvent(object, originatingEvent)); |
|
269 |
} |
|
270 |
|
|
241 | 271 |
|
242 | 272 |
/** |
243 | 273 |
* {@inheritDoc} |
Also available in: Unified diff
Merged with trunk