Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
as discussed in SLING-10011 it would be desirable to allow for retrieval of a Item's parent without having to deal with the exceptions that are thrown by Item.getParent() in case the parent does not exist or is not accessible.
I would like to suggest to introduce JackrabbitSession.getParentOrNull(Item item), which would return a Node or null. For backwards compatibility the new method should come with a default implementation that calls Item.getParent() and returns null in case of AccessDeniedException as it is thrown by oak-jcr if there is no accessible parent or ItemNotFoundException in case of the root node.
Attachments
Issue Links
- blocks
-
SLING-10011 Use JackrabbitSession.getParentOrNull when resolving parent JCR node in JcrResourceProvider#getParent
- Closed
- links to