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.