Note that this classloader is not "industrial strength"; users looking for such a class may wish to look at the Tomcat sourcecode instead. In particular, this class may not be threadsafe.
Note that the ClassLoader.getResources method isn't overloaded here. It would be nice to ensure that when child-first lookup is set the resources from the child are returned earlier in the list than the resources from the parent. However overriding this method isn't possible as the java 1.4 version of ClassLoader declares this method final (though the java 1.5 version has removed the final qualifier). As the ClassLoader javadoc doesn't specify the order in which resources are returned, it's valid to return the resources in any order (just untidy) so the inherited implementation is technically ok.
|
|