diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-04 06:17:55 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-04 06:17:55 +0000 |
commit | c56c8d69bd4b6d330f48e67f72c6c9f7efcbf9d6 (patch) | |
tree | 461394b2bcec625647d6fa1ce4255e5e9df38ea4 | |
parent | db15c0dbc72e85cf25ac86cd29b9b923d1020307 (diff) | |
download | gcc-c56c8d69bd4b6d330f48e67f72c6c9f7efcbf9d6.tar.gz |
* java/lang/ClassLoader.java (loadClass): Call loadClass on
VMClassLoader, not findClass.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58786 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/java/lang/ClassLoader.java | 20 |
2 files changed, 17 insertions, 8 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 8695a4acb22..1267d7683ae 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2002-11-03 Tom Tromey <tromey@redhat.com> + + * java/lang/ClassLoader.java (loadClass): Call loadClass on + VMClassLoader, not findClass. + 2002-11-03 Jeff Sturm <jsturm@one-point.com> * resolve.cc (METHOD_NOT_THERE, METHOD_INACCESSIBLE): Remove. diff --git a/libjava/java/lang/ClassLoader.java b/libjava/java/lang/ClassLoader.java index 2c0e21133d9..1b3b310cab3 100644 --- a/libjava/java/lang/ClassLoader.java +++ b/libjava/java/lang/ClassLoader.java @@ -177,14 +177,18 @@ public abstract class ClassLoader if (c == null) { - try { - if (parent != null) - return parent.loadClass (name, link); - else - c = gnu.gcj.runtime.VMClassLoader.instance.findClass (name); - } catch (ClassNotFoundException ex) { - /* ignore, we'll try findClass */; - } + try + { + ClassLoader cl = parent; + if (parent == null) + cl = gnu.gcj.runtime.VMClassLoader.instance; + if (cl != this) + c = cl.loadClass (name, link); + } + catch (ClassNotFoundException ex) + { + /* ignore, we'll try findClass */; + } } if (c == null) |