You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Sebastian Marsching (JIRA)" <ji...@apache.org> on 2009/06/19 14:35:07 UTC

[jira] Updated: (FELIX-1254) Bundle#findEntries does not return resources from fragments

     [ https://issues.apache.org/jira/browse/FELIX-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebastian Marsching updated FELIX-1254:
---------------------------------------

    Attachment: felix_FindEntriesEnumeration.patch

I have created a patch that fixes the problem for me.

Please review the patch and - if approved - commit it to SVN.

> Bundle#findEntries does not return resources from fragments
> -----------------------------------------------------------
>
>                 Key: FELIX-1254
>                 URL: https://issues.apache.org/jira/browse/FELIX-1254
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.8.0
>         Environment: Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
> Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode)
>            Reporter: Sebastian Marsching
>         Attachments: felix_FindEntriesEnumeration.patch
>
>
> In FELIX-1249 the ModuleImpl.getEntries() method has been fixed in order to search not only the bundle itself but consider attached fragments, too. However, this fix is not complete and therefore Bundle.findEntries(...) is still not working correctly:
> In FindEntriesEnumeration.findNext(...) (FindEntriesEnumeration.java, line 116) m_bundle.getCurrentModule().getEntry(...) is used to get the URL for the matching entry. However, if the entry comes from a fragment, this method returns null, which is correct as getEntry(...) should only return entries from the bundle itself, not from attached fragments.
> Therefore, FindEntriesEnumeration.findNext(...) has to take into account from which fragment (or the bundle itself) a matching entry is coming and use the getEntry(...) method of the corresponding fragment. In order to accomplish this task, instead of using CompoundEnumeration the FindEntriesEnumeration implementation should take care of searching the bundle and its attached fragments step by step. Thus it knows the fragment a matching entry is coming from and can get the entry from the correct fragment.

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