You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2014/09/16 16:07:34 UTC
[jira] [Resolved] (SLING-3896) TypeOverwritingResourceMapper does
not correctly implement the isResourceType method
[ https://issues.apache.org/jira/browse/SLING-3896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler resolved SLING-3896.
-------------------------------------
Resolution: Fixed
Thanks for reporting, I've committed a fix in rev 1625294
> 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)