minor - avoid concurrent modification exception

This commit is contained in:
Heng Sin Low 2008-11-25 03:27:32 +00:00
parent c696064fc8
commit 1730ffe726
1 changed files with 4 additions and 1 deletions

View File

@ -299,7 +299,10 @@ public abstract class WEditor implements EventListener, PropertyChangeListener
protected void fireValueChange(ValueChangeEvent event)
{
for (ValueChangeListener listener : listeners)
//copy to array to avoid concurrent modification exception
ValueChangeListener[] vcl = new ValueChangeListener[listeners.size()];
listeners.toArray(vcl);
for (ValueChangeListener listener : vcl)
{
listener.valueChange(event);
}