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/28 08:51:58 UTC
[jira] [Comment Edited] (SLING-6327)
ResourceResolverImpl.isResourceType() should compare relative resource
types (and ignore any search path prefixes)
[ https://issues.apache.org/jira/browse/SLING-6327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15701332#comment-15701332 ]
Konrad Windszus edited comment on SLING-6327 at 11/28/16 8:51 AM:
------------------------------------------------------------------
After some discussion in http://www.mail-archive.com/dev@sling.apache.org/msg62468.html I moved the util methods for the resource type to the resource resolver in [r1771688|https://svn.apache.org/r1771688] (and therefore do no longer publicly exposd those in {{ResourceUtil}}). The minor version change of package {{o.a.s.resource}} is still necessary because the semantics of {{Resource.isResourceType(...)}} and {{ResourceResolver.isResourceType(...)}} as well as {{ResourceUtil.isA()}} changed slightly, although we assume that this does not break existing code. To make it possible for new code to explicitly rely on this new semantics a minor version increase is still necessary.
was (Author: kwin):
After some discussion in http://www.mail-archive.com/dev@sling.apache.org/msg62468.html I moved the util methods for the resource type to the resource resolver (and therefore no longer publicly exposed those {{ResourceUtil}}) in [r1771688|https://svn.apache.org/r1771688]. The minor version change of package {{o.a.s.resource}} is still necessary because the semantics of {{Resource.isResourceType(...)}} and {{ResourceResolver.isResourceType(...)}} as well as {{ResourceUtil.isA()}} changed slightly, although we assume that this does not break code. To make it possible for new code to explicitly rely on this new semantics a minor version increase is still necessary.
> ResourceResolverImpl.isResourceType() should compare relative resource types (and ignore any search path prefixes)
> ------------------------------------------------------------------------------------------------------------------
>
> 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
> Fix For: API 2.15.2, Resource Resolver 1.5.6
>
> 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)