You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Richard S. Hall (JIRA)" <ji...@apache.org> on 2010/09/15 22:17:32 UTC

[jira] Updated: (FELIX-2569) Felix bundle classloader always delegates to parent loader in getResources()

     [ https://issues.apache.org/jira/browse/FELIX-2569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall updated FELIX-2569:
-----------------------------------

    Fix Version/s: framework-3.0.3
                       (was: framework-3.2.0)

> 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.0.3
>
>
> 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.