Revision 44866 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/layers/LayerChangeSupport.java
LayerChangeSupport.java | ||
---|---|---|
23 | 23 |
*/ |
24 | 24 |
package org.gvsig.fmap.mapcontext.layers; |
25 | 25 |
|
26 |
import java.util.ConcurrentModificationException; |
|
26 | 27 |
import java.util.HashSet; |
27 | 28 |
import java.util.Set; |
28 | 29 |
|
... | ... | |
71 | 72 |
* @param e a legend event with the new legend and events that compound this one |
72 | 73 |
*/ |
73 | 74 |
public void callLegendChanged(LegendChangedEvent e) { |
74 |
for (LegendListener listener : listeners) { |
|
75 |
|
|
76 |
for (int i = 0; i < 10; i++) { |
|
75 | 77 |
try { |
76 |
listener.legendChanged(e); |
|
77 |
} catch(Exception ex) { |
|
78 |
logger.warn("Error calling listener '"+listener.toString()+"'.",ex); |
|
78 |
for (LegendListener listener : listeners) { |
|
79 |
try { |
|
80 |
listener.legendChanged(e); |
|
81 |
} catch(Exception ex) { |
|
82 |
logger.warn("Error calling listener '"+listener.toString()+"'.",ex); |
|
83 |
} |
|
84 |
break; |
|
85 |
} |
|
86 |
} catch (ConcurrentModificationException ex) { |
|
87 |
continue; |
|
79 | 88 |
} |
80 | 89 |
} |
81 | 90 |
} |
Also available in: Unified diff