After a bit of thinking, I was wondering if a possible solution could be
to have the ability to change the ContentClassLoader implementation.
If something like this was present, I could have my own JDK5 only
ContentClassLoader that extends ContentClassLoader and override the
getResources method.
What do you think ?
May I start to create a patch for that ?
Thanks
--Guillaume
Guillaume Sauthier wrote:
Thanks for your input Felix
That was not the answer I was expecting :)
Anyway, do you have any idea about how to workaround this problem ?
Thanks
--Guillaume
Felix Meschberger wrote:
Hi Guillaume,
The problem with this method is, that upto and including Java 1.4 it is
marked final. It is not final anymore starting with Java 5.. So, the
ContentClassLoader cannot overwrite.
Hope this helps.
Regards
Felix
Am Mittwoch, den 16.01.2008, 17:09 +0100 schrieb Guillaume Sauthier:
Hi team
I've just noticed that the ContentClassLoader do not override the
ClassLoader.getResources(String) method.
It only override the ClassLoader.getResource(String method). Notice
the final 's', one of theses methods is returning an Enumeration,
not the other one.
Moreover, the ISearchPolicy, that is used under the hood to find
resources have a findResources(String):Enumeration method :)
I expect getResources() to list resources available to the bundle
(using OSGi constraints), not only "local" resources, which is the
current behavior.
This is probably something forgotten :)
Can you enlight me ? Is this normal, or not ?
Cheers
--Guillaume