[
https://issues.apache.org/jira/browse/SLING-3896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Carsten Ziegeler closed SLING-3896.
-----------------------------------
> TypeOverwritingResourceMapper does not correctly implement the isResourceType
> method
> ------------------------------------------------------------------------------------
>
> Key: SLING-3896
> URL: https://issues.apache.org/jira/browse/SLING-3896
> Project: Sling
> Issue Type: Bug
> Components: Engine
> Affects Versions: Engine 2.3.2
> Reporter: Konrad Windszus
> Assignee: Carsten Ziegeler
> Fix For: Engine 2.3.6
>
>
> The TypeOverwritingResourceMapper is used, whenever the request dispatcher
> acts on the same resource but with a different resource type.
> It just overwrites the methods getResourceType() and getResourceSuperType().
> Unfortunately the method isResourceType() is not overwritten leading to the
> following behaviour:
> I have a {{TypeOverwritingResourceMapper}} resource called "a" encapsulating
> a Resource with type "typeWrapped" and overwriting the type with
> "typeOverwritten":
> Now {{ResourceResolver.isResourceType(a, "typeOverwritten") == true}}, which
> is correct but {{a.isResourceType("typeOverwritten") == false}} which is not
> correct!
> The TypeOverwritingResourceMapper must overwrite also the method
> isResourceType, because otherwise it is called on the wrapped resource (and
> therefore considering the wrong resource type).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)