Revisit bundle resource URL handling with respect to bundle class path searching
--------------------------------------------------------------------------------
Key: FELIX-302
URL: https://issues.apache.org/jira/browse/FELIX-302
Project: Felix
Issue Type: Improvement
Components: Framework
Affects Versions: 1.0.0
Reporter: Richard S. Hall
Priority: Minor
When searching for resources in a bundle for Bundle.getResources(), Felix
searches the bundle class path and returns any matching resources from all
bundle class path entries. This means that it is possible that multiple
resources with the same relative name could be returned from the bundle (e.g.,
META-INF/MANIFEST.MF from each embedded JAR file).
To differentiate among such resources, Felix was prepending the class path
index to the resource path, but this is not a good approach because it doesn't
work properly when constructing URLs from other URLs. As a quick fix, I moved
the index to the URL port number instead. This is a slight improvement, but it
is still not 100% golden because it breaks the underlying module layer
abstractions and it could still result in unexpected results when constructing
URLs from other URLs.
The first part of find a solution to this issue is bringing this topic up for
discussion within CPEG to see if there is a general consensus on whether or not
multiple resources should be returned from the bundle class path. If not, then
we can modify Felix to ignore this issue altogether. If so, then we have to
think of a better way of handling this issue in the module layer abstractions.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.