* Throw exception instead of removing the old node when adding

a node to a named collection with a name that is already taken.
  Fixes bug 568 <http://helma.org/bugs/show_bug.cgi?id=568>
This commit is contained in:
hns 2007-11-12 13:41:56 +00:00
parent ac4e78cb17
commit 5cd2021502

View file

@ -2063,8 +2063,8 @@ public final class Node implements INode, Serializable {
INode n = (INode) parent.getChildElement(value);
if ((n != null) && (n != this)) {
parent.unset(value);
parent.removeNode(n);
throw new RuntimeException(this +
" already contains an object named " + value);
}
// check if this node is already registered with the old name;