Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-1254

Bundle#findEntries does not return resources from fragments

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • framework-1.8.0
    • framework-2.0.0
    • Framework
    • None
    • Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
      Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode)

    Description

      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.

      Attachments

        1. felix_FindEntriesEnumeration.patch
          6 kB
          Sebastian Marsching

        Issue Links

          Activity

            People

              rickhall Richard S. Hall
              smarsching Sebastian Marsching
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: