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 2014/08/29 10:39:54 UTC
[jira] [Created] (SLING-3896) TypeOverwritingResourceMapper does
not correctly implement the isResourceType method
Konrad Windszus created SLING-3896:
--------------------------------------
Summary: 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
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, "typeWrapped) == true}}, which is correct but {{a.isResourceType("typeWrapped) == 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.2#6252)