diff options
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | libjava/testsuite/libjava.loader/MyLoader.java | 5 | ||||
-rw-r--r-- | libjava/testsuite/libjava.loader/TestParent.java | 29 | ||||
-rw-r--r-- | libjava/testsuite/libjava.loader/TestParent.out | 0 |
4 files changed, 40 insertions, 0 deletions
diff --git a/libjava/testsuite/ChangeLog b/libjava/testsuite/ChangeLog index dac72fb..47ab430 100644 --- a/libjava/testsuite/ChangeLog +++ b/libjava/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2002-11-04 Anthony Green <green@redhat.com> + * libjava.loader/MyLoader.java: New constructor. + * libjava.loader/TestParent.java: New file. + * libjava.loader/TestParent.out: New file. + +2002-11-04 Anthony Green <green@redhat.com> + * libjava.loader/TestEarlyGC.java, libjava.loader/TestEarlyGC.out: New files (from Jeff Sturm). diff --git a/libjava/testsuite/libjava.loader/MyLoader.java b/libjava/testsuite/libjava.loader/MyLoader.java index 49156fc..40c31d7 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 0000000..3996b76 --- /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 0000000..e69de29 --- /dev/null +++ b/libjava/testsuite/libjava.loader/TestParent.out |