cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Haraburda <>
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
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
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


To unsubscribe, e-mail:
For additional commands, email:

View raw message