Update of /var/cvs/src/org/mmbase/core/event
In directory james.mmbase.org:/tmp/cvs-serv23858
Modified Files:
Tag: MMBase-1_8
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.6.2.2
retrieving revision 1.6.2.3
diff -u -b -r1.6.2.2 -r1.6.2.3
--- NodeEventHelper.java 7 Feb 2008 16:14:38 -0000 1.6.2.2
+++ NodeEventHelper.java 30 Jun 2008 08:24:53 -0000 1.6.2.3
@@ -73,6 +73,7 @@
private static Map removeBinaryValues(Map oldEventValues) {
Set toremove = null;
+ synchronized(oldEventValues) {
for (Iterator iterator = oldEventValues.entrySet().iterator();
iterator.hasNext();) {
Map.Entry entry = (Map.Entry) iterator.next();
if (entry.getValue() != null && (entry.getValue() instanceof
byte[])) {
@@ -80,6 +81,7 @@
toremove.add(entry.getKey());
}
}
+ }
if (toremove != null) {
Map newMap = new HashMap();
newMap.putAll(oldEventValues);
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs