Felix bundle classloader always delegates to parent loader in getResources()
----------------------------------------------------------------------------
Key: FELIX-2569
URL: https://issues.apache.org/jira/browse/FELIX-2569
Project: Felix
Issue Type: Bug
Components: Framework
Affects Versions: framework-3.0.2
Reporter: Sahoo
Fix For: framework-3.2.0
Felix's bundle class loader does not override getResources(); instead it
overrides findResources(). As a result of this, it always delegates to parent
class loader. I see the following interesting comment in the code:
// The findResources() method should only look at the module itself, but
// instead it tries to delegate because in Java version prior to 1.5 the
// getResources() method was final and could not be overridden. We
should
// override getResources() like getResource() to make it delegate, but
we
// can't. As a workaround, we make findResources() delegate instead.
protected Enumeration findResources(String name)
{
return getResourcesByDelegation(name);
}
Can we have something like two different implementations targeting pre and post
JRE 1.5 and let runtime select appropriate one? If there is a better way, then
even better.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.