[
https://issues.apache.org/jira/browse/SLING-779?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Felix Meschberger closed SLING-779.
-----------------------------------
Resolution: Fixed
Fixed in Rev. 726817.
> ResourceUtil.getParent(Resource) must not use ResourceResolver.resolve
> ----------------------------------------------------------------------
>
> Key: SLING-779
> URL: https://issues.apache.org/jira/browse/SLING-779
> Project: Sling
> Issue Type: Bug
> Components: API
> Affects Versions: JCR API 2.0.2
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: API 2.0.4
>
>
> The ResourceUtil.getParent(Resource) method uses the ResourceResolver.resolve
> method to get the parent resource of the given resource. This is incorrect,
> since the resolve method applies mapping methods, which are not appropriate
> here. Here we just want to get resource, therefore the getResource method is
> to be used.
> Using resolve here may create an endless loop in the
> JcrResourceResolver2.map(HttpServletRequest, String) method, which uses this
> method to walk up the parent resource chain - which may result in repated
> sling:alias resolution.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.