if (srcParentPath.equals(destParentPath)) {
if (srcParent.getChildNodeEntry(destNodeName) != null) {
throw new Exception("node already exists at move destination path: " + destPath);
}
if (srcParent.rename(srcNodeName, destNodeName) == null) {
throw new NotFoundException(srcPath);
}
} else {
ChildNode srcCNE = srcParent.remove(srcNodeName);
if (srcCNE == null) {
throw new NotFoundException(srcPath);
}
MutableNode destParent = getOrCreateStagedNode(destParentPath);
if (destParent.getChildNodeEntry(destNodeName) != null) {
throw new Exception("node already exists at move destination path: " + destPath);