You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2008/12/08 12:24:46 UTC

[jira] Created: (SLING-761) ResourceResolver.getResource(String) returns null even if child resources exist for the requested path

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.


[jira] Closed: (SLING-761) ResourceResolver.getResource(String) returns null even if child resources exist for the requested path

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger closed SLING-761.
-----------------------------------

    Resolution: Fixed

Functionality reported by this issue is now implemented as commented above.

> 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, Servlets Resolver
>    Affects Versions: JCR Resource 2.0.2, Servlets Resolver 2.0.4
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For:  Servlets Resolver 2.0.6, 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.


[jira] Updated: (SLING-761) ResourceResolver.getResource(String) returns null even if child resources exist for the requested path

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated SLING-761:
------------------------------------

          Component/s: Servlets Resolver
    Affects Version/s: Servlets Resolver 2.0.4
        Fix Version/s:  Servlets Resolver 2.0.6

This issue also affects the ResourceProvider implementation of the servlet resolver since the ServletResourceIterator should return what the resource resolver returns otherwise some resources may go unnoticed in the child resource iterators.

> 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, Servlets Resolver
>    Affects Versions: JCR Resource 2.0.2, Servlets Resolver 2.0.4
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For:  Servlets Resolver 2.0.6, 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.


[jira] Commented: (SLING-761) ResourceResolver.getResource(String) returns null even if child resources exist for the requested path

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654376#action_12654376 ] 

Felix Meschberger commented on SLING-761:
-----------------------------------------

Extended the implementation of accessing actual resources from the resource tree through the ResourceProviderEntry instances in Rev. 724311.

Now a SyntheticResource is returned for non-existing resources along the path to lower provided resources.

> 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.


[jira] Commented: (SLING-761) ResourceResolver.getResource(String) returns null even if child resources exist for the requested path

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654378#action_12654378 ] 

Felix Meschberger commented on SLING-761:
-----------------------------------------

Adaped the Servlet Resolver ServletResourceIterator to return what the ResourceResolver brings in Rev. 724312. We still keep the check for the null resource because JcrResourceResolver prior to Rev. 724311 still return null for such intermediate resources.

> 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, Servlets Resolver
>    Affects Versions: JCR Resource 2.0.2, Servlets Resolver 2.0.4
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For:  Servlets Resolver 2.0.6, 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.