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

Modified Files:
      Tag: MMBase-1_8
        NodeEventHelper.java 
Log Message:
MMB-1553 Message too long errors in the log.


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


Index: NodeEventHelper.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/core/event/NodeEventHelper.java,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -b -r1.6 -r1.6.2.1
--- NodeEventHelper.java        18 Jul 2006 13:00:52 -0000      1.6
+++ NodeEventHelper.java        3 Feb 2008 16:58:11 -0000       1.6.2.1
@@ -67,9 +67,21 @@
         }
         }
 
+        removeBinaryValues(oldEventValues);
+        removeBinaryValues(newEventValues);
+
         return new NodeEvent(machineName, node.getBuilder().getTableName(), 
node.getNumber(), oldEventValues, newEventValues, eventType);
     }
 
+    private static void removeBinaryValues(Map oldEventValues) {
+        for (Iterator iterator = oldEventValues.entrySet().iterator(); 
iterator.hasNext();) {
+            Map.Entry entry = (Map.Entry) iterator.next();
+            if (entry.getValue() != null && (entry.getValue() instanceof 
byte[])) {
+                entry.setValue(null);
+            }
+        }
+    }
+
     public static RelationEvent createRelationEventInstance(Relation node, int 
eventType, String machineName){
         MMObjectNode coreNode = 
MMBase.getMMBase().getBuilder(node.getNodeManager().getName()).getNode(node.getNumber());
         return createRelationEventInstance(coreNode, eventType, machineName);
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to