Author: mircea.markus
Date: 2008-03-26 17:53:26 -0400 (Wed, 26 Mar 2008)
New Revision: 5464
Modified:
core/branches/1.4.X/tests/functional/org/jboss/cache/loader/DummyInMemoryCacheLoader.java
Log:
guard against ConcurrentModEx
Modified:
core/branches/1.4.X/tests/functional/org/jboss/cache/loader/DummyInMemoryCacheLoader.java
===================================================================
---
core/branches/1.4.X/tests/functional/org/jboss/cache/loader/DummyInMemoryCacheLoader.java 2008-03-26
19:48:15 UTC (rev 5463)
+++
core/branches/1.4.X/tests/functional/org/jboss/cache/loader/DummyInMemoryCacheLoader.java 2008-03-26
21:53:26 UTC (rev 5464)
@@ -84,9 +84,14 @@
public Map get(Fqn name) throws Exception
{
DummyNode dn = (DummyNode)nodes.get(name);
- Map d = (Map) (dn != null ? dn.data.clone() : null);
+ Map d = dn != null ? dn.data : null;
- if (log.isDebugEnabled()) log.debug("Getting data for fqn " + name +
" = " + d);
+ if (log.isDebugEnabled())
+ {
+ try {
+ log.debug("Getting data for fqn " + name + " = " + d );
+ } catch (Exception e) {} //concurrent modification may appear here
+ }
return d;
}
@@ -280,12 +285,12 @@
}
for(Iterator it = children_names.iterator(); it.hasNext();)
- {
+ {
child_name = (String) it.next();
tmp_fqn = new Fqn(fqn, child_name);
//loadStateHelper(tmp_fqn, out);
getNodeDataList(tmp_fqn, list);
- }
+ }
}
public void storeEntireState(byte[] state) throws Exception
@@ -352,7 +357,7 @@
public class DummyNode
{
- HashMap data = new HashMap();
+ Map data = new HashMap();
Fqn fqn;
public DummyNode(Fqn fqn)
Show replies by date