diff --git a/libjava/testsuite/ChangeLog b/libjava/testsuite/ChangeLog index dac72fbca2e0..47ab4301589c 100644 --- a/libjava/testsuite/ChangeLog +++ b/libjava/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2002-11-04 Anthony Green + + * libjava.loader/MyLoader.java: New constructor. + * libjava.loader/TestParent.java: New file. + * libjava.loader/TestParent.out: New file. + 2002-11-04 Anthony Green * libjava.loader/TestEarlyGC.java, diff --git a/libjava/testsuite/libjava.loader/MyLoader.java b/libjava/testsuite/libjava.loader/MyLoader.java index 49156fc62f42..40c31d7f6823 100644 --- a/libjava/testsuite/libjava.loader/MyLoader.java +++ b/libjava/testsuite/libjava.loader/MyLoader.java @@ -6,4 +6,9 @@ public class MyLoader extends URLClassLoader { super (urls); } + + public MyLoader (URL urls[], ClassLoader parent) + { + super (urls, parent); + } } diff --git a/libjava/testsuite/libjava.loader/TestParent.java b/libjava/testsuite/libjava.loader/TestParent.java new file mode 100644 index 000000000000..3996b7671c0d --- /dev/null +++ b/libjava/testsuite/libjava.loader/TestParent.java @@ -0,0 +1,29 @@ +import java.net.*; + +public class TestParent +{ + public static void main (String[] args) + { + URLClassLoader ucl = + (URLClassLoader) ClassLoader.getSystemClassLoader(); + URL urls[] = ucl.getURLs (); + + MyLoader parent = new MyLoader (urls); + + MyLoader t1 = new MyLoader (urls, parent); + MyLoader t2 = new MyLoader (urls, parent); + + Class c1, c2; + + try { + + c1 = t1.loadClass ("dummy"); + c2 = t2.loadClass ("dummy"); + + } + catch (Exception e) { + e.printStackTrace (); + } + } +} + diff --git a/libjava/testsuite/libjava.loader/TestParent.out b/libjava/testsuite/libjava.loader/TestParent.out new file mode 100644 index 000000000000..e69de29bb2d1