cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Haraburda <david-coc...@haraburda.com>
Subject Re: [help needed] Patching the Servlet API on classloading
Date Tue, 18 Jun 2002 19:47:16 GMT
Sylvain Wallez wrote:

>
> . . .
> Another related item : while updating the ParanoidClassloader to make it
> really paranoid, I encountered an inconsistency in java.lang.ClassLoader
> class : getResource() can be overriden, but getResources() is declared
> final, meaning there is no way to change the order in which e.g.
> indentical service definitions in META-INF/services are enumerated.
> Although this shouldn't cause a problem with JAXP (at least the Apache
> implementation) which uses getResource() (no enumeration), we should be
> aware that this is a potential pitfall.

This isn't an inconsistency, it's intentional -- getResources() is a final
method
that calls findResources, a protected method on the current instance of the
ClassLoader.  ClassLoader implementations should override findResources().
The purpose of getResources() is to get a set of resources from all the
classloaders
in the classloader heirarchy.

>
>
> As this item impacts one of the core classes of the JDK, it may be
> difficult to convice people to fix it, but this would allow to uniformly
> override the search order in specialized classloaders.
>
> Sylvain

David


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message