[jbosscache-commits] JBoss Cache SVN: r6717 - in core/branches/1.4.X: tests/functional/org/jboss/cache and 1 other directory.
jbosscache-commits at lists.jboss.org
jbosscache-commits at lists.jboss.org
Fri Sep 12 18:04:16 EDT 2008
Author: jiwils
Date: 2008-09-12 18:04:16 -0400 (Fri, 12 Sep 2008)
New Revision: 6717
Modified:
core/branches/1.4.X/src/org/jboss/cache/TreeCache.java
core/branches/1.4.X/tests/functional/org/jboss/cache/RemoveOnTxTest.java
Log:
Added Takayoshi's patch to JBAS-1406.
Modified: core/branches/1.4.X/src/org/jboss/cache/TreeCache.java
===================================================================
--- core/branches/1.4.X/src/org/jboss/cache/TreeCache.java 2008-09-12 21:54:20 UTC (rev 6716)
+++ core/branches/1.4.X/src/org/jboss/cache/TreeCache.java 2008-09-12 22:04:16 UTC (rev 6717)
@@ -4308,7 +4308,11 @@
{
if (log.isDebugEnabled()) log.debug("Node " + f + " NOT marked for removal as expected, not removing!");
//also check whether children are marked for deletion, JBCACHE-1406
- Iterator iterator = n.getChildren(true).values().iterator();
+ Map children = n.getChildren(true);
+ if (children == null) {
+ return;
+ }
+ Iterator iterator = children.values().iterator();
while (iterator.hasNext())
{
DataNode data = (DataNode) iterator.next();
Modified: core/branches/1.4.X/tests/functional/org/jboss/cache/RemoveOnTxTest.java
===================================================================
--- core/branches/1.4.X/tests/functional/org/jboss/cache/RemoveOnTxTest.java 2008-09-12 21:54:20 UTC (rev 6716)
+++ core/branches/1.4.X/tests/functional/org/jboss/cache/RemoveOnTxTest.java 2008-09-12 22:04:16 UTC (rev 6717)
@@ -72,10 +72,10 @@
assertTrue(!cache.exists("/a/b/c"));
assertTrue(cache.exists("/a/b/d"));
cache.printLockInfo();
- } catch (Exception ex)
- {
- ex.printStackTrace();
+ }
+ catch (Exception ex) {
tm.rollback();
+ throw ex;
}
cache.printLockInfo();
System.out.println(" lock info " + cache.printLockInfo());
@@ -89,8 +89,8 @@
try
{
cache.putFailFast("/a/b/c", "test", "test", 0);
- } catch (Exception ignore)
- {
+ }
+ catch (Exception ignore) {
ignore.printStackTrace();
}
tm.resume(t);
@@ -99,10 +99,10 @@
cache.put("/a/b/c", "test", "test");
print(cache.exists("/a/b/c"));
tm.commit();
- } catch (Exception ex)
- {
- ex.printStackTrace();
+ }
+ catch (Exception ex) {
tm.rollback();
+ throw ex;
}
}
More information about the jbosscache-commits
mailing list