[ 
https://issues.apache.org/jira/browse/SLING-3730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14051424#comment-14051424
 ] 

Konrad Windszus commented on SLING-3730:
----------------------------------------

I would propose setting that to the resource path of the first resource in the 
given list of resources 
(https://github.com/apache/sling/blob/trunk/contrib/extensions/resourcemerger/src/main/java/org/apache/sling/resourcemerger/impl/MergedResource.java)

> MergedResource does not set the metadata "sling.resolutionPath" properly
> ------------------------------------------------------------------------
>
>                 Key: SLING-3730
>                 URL: https://issues.apache.org/jira/browse/SLING-3730
>             Project: Sling
>          Issue Type: Bug
>    Affects Versions: Resource Merger 1.1.2
>            Reporter: Konrad Windszus
>            Priority: Critical
>
> This metadata is evaluated by calling: 
> SlingHttpServletRequest().getRequestPathInfo().getResourcePath() (you can see 
> how this field is initially set in 
> org.apache.sling.engine.impl.request.SlingRequestPathInfo, line 59). This is 
> e.g. the case in 
> org.apache.sling.rewriter.impl.ProcessorConfigurationImpl.match(ProcessorConfigurationImpl.java:411).
>  If it returns null like it does for MergedResources (due to that metadata 
> not being set) that leads easily to NPEs like in the example with the 
> SlingRewriter.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to