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

Felix Meschberger commented on SLING-1733:
------------------------------------------

Patch looks good for me with one comment for simplification: Instead of getting 
the bundleId to compare, you can simply compare the bundle cache objects to 
only use the parent bundle resource iff they are managed by the same 
BundleCache instance.

        if (((BundleResource)parent).getBundle() == this.bundle) {
               return ((BundleResource) parent).listChildren();
        }

> BundleResourceProvider fails to find resources when multiple bundles have the 
> same Sling-Bundle-Resources path
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-1733
>                 URL: https://issues.apache.org/jira/browse/SLING-1733
>             Project: Sling
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: Extensions Bundleresource 2.0.4
>            Reporter: Eric Norman
>            Assignee: Eric Norman
>             Fix For: Extensions Bundleresource 2.0.6
>
>         Attachments: SLING-1733.patch
>
>
> If multiple bundles are providing Sling-Bundle-Resources with the same path, 
> the resources from the second bundle are not accessible. 
> .
> For example:
> Bundle 1 contains these scripts:
> /libs/sling/servlet/default/script1.html.esp
> /libs/sling/servlet/default/script2.html.esp
> And the resource is provided as:
> <Sling-Bundle-Resources>
>     /libs/sling/servlet/default
> </Sling-Bundle-Resources>
> Bundle 2 contains these scripts:
> /libs/sling/servlet/default/script2.html.esp
> /libs/sling/servlet/default/script3.html.esp
> And the resource is provided as:
> <Sling-Bundle-Resources>
>     /libs/sling/servlet/default
> </Sling-Bundle-Resources>
>  
> With both bundles installed, you either see the scripts from bundle1 or the 
> scripts from bundle2 but not both. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to