Update of /var/cvs/src/org/mmbase/core/event
In directory james.mmbase.org:/tmp/cvs-serv23926

Modified Files:
        NodeEventHelper.java 
Log Message:
Itering over a synchronized Map, should lock on the map to protect against CME. 
MMB-1670


See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/core/event
See also: http://www.mmbase.org/jira/browse/MMB-1670


Index: NodeEventHelper.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/core/event/NodeEventHelper.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- NodeEventHelper.java        7 Feb 2008 16:22:34 -0000       1.11
+++ NodeEventHelper.java        30 Jun 2008 08:25:35 -0000      1.12
@@ -19,7 +19,7 @@
  * but we need a little help for easy instantiation.
  * @author Ernst Bunders
  * @since MMBase-1.8
- * @version $Id: NodeEventHelper.java,v 1.11 2008/02/07 16:22:34 michiel Exp $
+ * @version $Id: NodeEventHelper.java,v 1.12 2008/06/30 08:25:35 michiel Exp $
 
  */
 public class NodeEventHelper {
@@ -73,12 +73,14 @@
 
     private static Map<String, Object> removeBinaryValues(Map<String, Object> 
oldEventValues) {
         Set<String> toremove = null;
+        synchronized(oldEventValues) {
         for (Map.Entry<String, Object> entry : oldEventValues.entrySet()) {
             if (entry.getValue() != null && (entry.getValue() instanceof 
byte[])) {
                 if (toremove == null) toremove = new HashSet<String>();
                 toremove.add(entry.getKey());
             }
         }
+        }
         if (toremove != null) {
             Map<String, Object> newMap = new HashMap<String, Object>();
             newMap.putAll(oldEventValues);
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to