Remove recently-added implementation of getResources. As javadoc already stated,
this can't be implemented because in java 1.4 getResources is final :-(. Unit tests that care about getResources() order will just have to use parentFirst=true. git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@394563 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -98,6 +98,10 @@ public class PathableClassLoader extends URLClassLoader {
|
|||||||
* child-first lookup instead, to allow the components to override libs
|
* child-first lookup instead, to allow the components to override libs
|
||||||
* which are visible in shared classloaders provided by the container.
|
* which are visible in shared classloaders provided by the container.
|
||||||
* <p>
|
* <p>
|
||||||
|
* Note that the method getResources always behaves as if parentFirst=true,
|
||||||
|
* because of limitations in java 1.4; see the javadoc for method
|
||||||
|
* getResourcesInOrder for details.
|
||||||
|
* <p>
|
||||||
* This value defaults to true.
|
* This value defaults to true.
|
||||||
*/
|
*/
|
||||||
public void setParentFirst(boolean state) {
|
public void setParentFirst(boolean state) {
|
||||||
@@ -237,11 +241,14 @@ public class PathableClassLoader extends URLClassLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Same as parent class method except that when parentFirst is false
|
* Emulate a proper implementation of getResources which respects the
|
||||||
* any resources in the local classpath are returned before resources
|
* setting for parentFirst.
|
||||||
* in the parent.
|
* <p>
|
||||||
|
* Note that it's not possible to override the inherited getResources, as
|
||||||
|
* it's declared final in java1.4 (thought that's been removed for 1.5).
|
||||||
|
* The inherited implementation always behaves as if parentFirst=true.
|
||||||
*/
|
*/
|
||||||
public Enumeration getResources(String name) throws IOException {
|
public Enumeration getResourcesInOrder(String name) throws IOException {
|
||||||
if (parentFirst) {
|
if (parentFirst) {
|
||||||
return super.getResources(name);
|
return super.getResources(name);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user