Hello all

I'm getting a NullPointerException on this call:

structure.getParent(token, currentNode);

This only occurs when currentNode is the root node, ie "/". (and therefore
it doesnt have a parent).

I traced it to this line of code. getParentUri is returning null, and
toString is causing the NullPointerException. 

        String parentUri = namespace.getUri(objectUri)
            .getParentUri().toString();

It would be nice if either Uri.getParentUri or Structure.getParent could
throw a NodeHasNoParentException or something similar if it is dealing with
the root node.

Cheers,
Dave

Reply via email to