From 891d0f74e111b334a626e78369a6d739434131b7 Mon Sep 17 00:00:00 2001 From: hns Date: Mon, 10 Dec 2007 10:47:41 +0000 Subject: [PATCH] * Fix bug 582, which is a regression caused by the fix for bug 551. http://helma.org/bugs/show_bug.cgi?id=582 http://helma.org/bugs/show_bug.cgi?id=551 --- src/helma/objectmodel/db/NodeManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/helma/objectmodel/db/NodeManager.java b/src/helma/objectmodel/db/NodeManager.java index 4427c6b4..04a8a9a4 100644 --- a/src/helma/objectmodel/db/NodeManager.java +++ b/src/helma/objectmodel/db/NodeManager.java @@ -1858,10 +1858,11 @@ public final class NodeManager { return null; } else if (Thread.currentThread() instanceof Transactor) { // Check if the node is already registered with the transactor - - // it may be in the process of being DELETED. + // it may be in the process of being DELETED, but do return the + // new node if the old one has been marked as INVALID. DbKey key = new DbKey(dbmap, id); Node dirtyNode = ((Transactor) Thread.currentThread()).getDirtyNode(key); - if (dirtyNode != null) { + if (dirtyNode != null && dirtyNode.getState() != Node.INVALID) { return dirtyNode; } }