You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Justin Edelson <ju...@gmail.com> on 2010/05/24 20:50:12 UTC

why does updating a node without a corresponding node fail silently?

I just spent a few hours tracking down a problem whereby Node.update()
was only updating part of a subgraph. It turns out this was because the
nodes weren't actually corresponding nodes. This would have been a lot
easier to figure out if VersionManagerImplMerge logged or otherwise
notified when this happened. However, this comment leads me to believe
this behavior is intentional:

        NodeStateEx srcNode = getCorrespondingNode(state, srcRoot);
        if (srcNode == null) {
            // If this node (the one on which merge is called) does not
have a corresponding
            // node in the indicated workspace, then the merge method
returns quietly and no
            // changes are made.
            return;
        }

Is there a particular reason why this isn't logged? I know the spec says
that update() shouldn't do anything if there's no corresponding node,
but this still seems like something which should be logged.

WDYT?

Thanks,
Justin