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 11:53:07 UTC

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

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


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.


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

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall resolved FELIX-1254.
------------------------------------

       Resolution: Fixed
    Fix Version/s: felix-2.0.0
         Assignee: Richard S. Hall

I looked over the patch and committed it modulo some minor formatting issues. Good catch! Please close this issue if you are satisfied.

> 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
>            Assignee: Richard S. Hall
>             Fix For: felix-2.0.0
>
>         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.


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

Posted by "Sebastian Marsching (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebastian Marsching closed FELIX-1254.
--------------------------------------


Thanks for commiting the patch so quickly. I again tested with the latest version from SVN and the problem seems to be fixed now.


> 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
>            Assignee: Richard S. Hall
>             Fix For: felix-2.0.0
>
>         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.


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

Posted by "Sebastian Marsching (JIRA)" <ji...@apache.org>.
     [ 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.