[jboss-cvs] JBossCache/src/org/jboss/cache/notifications ...
Elias Ross
genman at noderunner.net
Mon Nov 20 00:09:16 EST 2006
User: genman
Date: 06/11/20 00:09:16
Modified: src/org/jboss/cache/notifications Notifier.java
Log:
JBCACHE-867 - Fix impl dependence on getData() being a copy
Revision Changes Path
1.9 +5 -3 JBossCache/src/org/jboss/cache/notifications/Notifier.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Notifier.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/notifications/Notifier.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- Notifier.java 19 Oct 2006 14:24:13 -0000 1.8
+++ Notifier.java 20 Nov 2006 05:09:15 -0000 1.9
@@ -17,6 +17,7 @@
import org.jgroups.View;
import java.util.Collections;
+import java.util.HashMap;
import java.util.Map;
import java.util.Set;
@@ -141,16 +142,17 @@
public synchronized void notifyNodeModified(Fqn fqn, boolean pre, Map data)
{
boolean originLocal = treeCache.getInvocationContext().isOriginLocal();
+ Map copy = Collections.unmodifiableMap(new HashMap(data));
resetInvocationContext();
if (evictionPolicyListener != null)
{
- evictionPolicyListener.nodeModified(fqn, pre, originLocal, data);
+ evictionPolicyListener.nodeModified(fqn, pre, originLocal, copy);
}
if (hasListeners)
{
for (CacheListener listener : listeners)
{
- listener.nodeModified(fqn, pre, originLocal, data);
+ listener.nodeModified(fqn, pre, originLocal, copy);
}
}
restoreInvocationContext();
More information about the jboss-cvs-commits
mailing list