You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Konrad Windszus (JIRA)" <ji...@apache.org> on 2016/11/24 16:51:58 UTC

[jira] [Updated] (SLING-6327) ResourceResolverImpl.isResourceType() should consider resource resolver's search path

     [ https://issues.apache.org/jira/browse/SLING-6327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Konrad Windszus updated SLING-6327:
-----------------------------------
    Attachment: SLING-6327-v01.patch

Attached is a patch which modifies the behaviour of {{RR.isResourceType(Resource, String)}} for mixed absolute and relative resource types as described above. I put the logic into the {{ResourceUtil}} which introduces a dependency to the newest SNAPSHOT of the API bundle in the resolver bundle.

[~bdelacretaz][~jsedding]Could you take a look?

> ResourceResolverImpl.isResourceType() should consider resource resolver's search path
> -------------------------------------------------------------------------------------
>
>                 Key: SLING-6327
>                 URL: https://issues.apache.org/jira/browse/SLING-6327
>             Project: Sling
>          Issue Type: Improvement
>          Components: ResourceResolver
>    Affects Versions: API 2.15.0, Resource Resolver 1.5.2
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>         Attachments: SLING-6327-v01.patch
>
>
> Currently the following two expressions return false
> {{ResourceResolverImpl.isResourceType(<Resource with resourceType="sling/some/type">, "/libs/sling/some/type"}}
> {{ResourceResolverImpl.isResourceType(<Resource with resourceType="/libs/sling/some/type">, "sling/some/type"}}
> Since it cannot always be influenced whether the given resource is absolute or relative (because both usually works from a rendering perspective when you talk about the current request's resource), both cases should actually return {{true}}.
> See also the related discussion at http://www.mail-archive.com/dev@sling.apache.org/msg62351.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)