don't use existing object in getNode() if a lookup in

the db showed it doesn't exist (anymore)
This commit is contained in:
hns 2001-05-25 17:34:47 +00:00
parent 598111bba7
commit 6dd081e99a

View file

@ -261,7 +261,7 @@ public final class NodeManager {
synchronized (cache) {
Node oldnode = (Node) cache.put (key, new NullNode ());
// for the rare case that some other thread created the node in the meantime
if (oldnode != null && !(oldnode instanceof NullNode) && oldnode.getState () != Node.INVALID) {
/* if (oldnode != null && !(oldnode instanceof NullNode) && oldnode.getState () != Node.INVALID) {
Key primKey = oldnode.getKey ();
boolean keyIsPrimary = primKey.equals (key);
cache.put (oldnode.getKey (), oldnode);
@ -269,9 +269,9 @@ public final class NodeManager {
cache.put (key, oldnode);
}
node = oldnode;
} else {
} else { */
return null;
}
// }
}
}
} else if (node instanceof NullNode) {