From 1730ffe7262d3f33dba88281b719ad4fc9c26e0c Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Tue, 25 Nov 2008 03:27:32 +0000 Subject: [PATCH] minor - avoid concurrent modification exception --- zkwebui/WEB-INF/src/org/adempiere/webui/editor/WEditor.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WEditor.java b/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WEditor.java index ffca6a6754..7c8e3bd210 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WEditor.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WEditor.java @@ -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); }