You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2021/07/26 07:29:35 UTC

[GitHub] [sling-org-apache-sling-jcr-resource] jsedding commented on pull request #17: Use javax.jcr.Item.getParent() when resolving parent JCR node in JcrResourceProvider#getParent

jsedding commented on pull request #17:
URL: https://github.com/apache/sling-org-apache-sling-jcr-resource/pull/17#issuecomment-886450683


   @cziegeler I assume we would get the old behaviour (or very close) if we catch `ItemNotFoundException` and `AccessDeniedException` where no warning is logged. In case a straight `RepositoryException` is thrown, a warning should be logged. WDYT?
   
   From the javadoc of `Item.getParent()`:
   > @throws ItemNotFoundException if this <code>Item</code> is the root node of a workspace.
   > @throws AccessDeniedException if the current session does not have sufficent access to retrieve the parent of this item.
   > @throws RepositoryException   if another error occurs.
   
   PS: I'd still prefer a performance fix for `getItemOrNull()` in Oak, because that would be generally useful. But I understand it is a lot more work.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org