ResourceResolver.getResource(String) returns null even if child resources exist
for the requested path
------------------------------------------------------------------------------------------------------
Key: SLING-761
URL: https://issues.apache.org/jira/browse/SLING-761
Project: Sling
Issue Type: Bug
Components: JCR Resource
Affects Versions: JCR Resource 2.0.2
Reporter: Felix Meschberger
Assignee: Felix Meschberger
Fix For: JCR Resource 2.0.4
Using ResourceProviders it is possible to add resources to the resource tree,
which do not exist in the repository. This mechanism is for example used to
inject Bundle resources or Servlets into the resource tree.
Currently the JcrResourceResolver implementing the ResourceResolver interface
returns null for any resources not reflected by a JCR item but being
semantically parents of such non-JCR resources.
For example: A servlet is registered as /apps/sling/sample/GET.servlet.
Requesting the /apps/sling/sample resource would return null if no JCR item
would exist at that path. This is kind of unexpected.
Actually the JcrResourceResolver should return a synthetic resource in cases,
where a ResourceProvider provides resources a descendant location of a
requested path but no actual resource exists at the requested path.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.