--- a/jdk/test/java/util/ResourceBundle/Bug4168625Test.java Tue Jun 15 20:29:22 2010 -0700
+++ b/jdk/test/java/util/ResourceBundle/Bug4168625Test.java Tue Jun 15 20:34:49 2010 -0700
@@ -431,9 +431,11 @@
private boolean network = false;
public SimpleLoader() {
+ super(SimpleLoader.class.getClassLoader());
this.network = false;
}
public SimpleLoader(boolean simulateNetworkLoad) {
+ super(SimpleLoader.class.getClassLoader());
this.network = simulateNetworkLoad;
}
public Class loadClass(final String className, final boolean resolveIt)
@@ -448,7 +450,7 @@
} catch (java.lang.InterruptedException e) {
}
}
- result = super.findSystemClass(className);
+ result = getParent().loadClass(className);
if ((result != null) && resolveIt) {
resolveClass(result);
}
@@ -464,11 +466,13 @@
private String[] classesToWaitFor;
public Loader() {
+ super(Loader.class.getClassLoader());
classesToLoad = new String[0];
classesToWaitFor = new String[0];
}
public Loader(final String[] classesToLoadIn, final String[] classesToWaitForIn) {
+ super(Loader.class.getClassLoader());
classesToLoad = classesToLoadIn;
classesToWaitFor = classesToWaitForIn;
}
@@ -544,10 +548,12 @@
}
/**
- * Delegate loading to the system loader
+ * Delegate loading to its parent class loader that loads the test classes.
+ * In othervm mode, the parent class loader is the system class loader;
+ * in samevm mode, the parent class loader is the jtreg URLClassLoader.
*/
private Class loadFromSystem(String className) throws ClassNotFoundException {
- return super.findSystemClass(className);
+ return getParent().loadClass(className);
}
public void logClasses(String title) {