diff options
author | Tom Tromey <tromey@gcc.gnu.org> | 2004-11-25 03:47:08 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2004-11-25 03:47:08 +0000 |
commit | 367390404d26b7bfc400d77893579e83e2a19fb9 (patch) | |
tree | 477abdf83653e20b0e74447d6ca47eb67b0511b8 /libjava/java/lang/VMClassLoader.java | |
parent | ec0641f612862498e829fdaf040a201c0ba68762 (diff) | |
download | gcc-367390404d26b7bfc400d77893579e83e2a19fb9.zip gcc-367390404d26b7bfc400d77893579e83e2a19fb9.tar.gz gcc-367390404d26b7bfc400d77893579e83e2a19fb9.tar.bz2 |
* Merged gcj-abi-2-dev-branch to trunk.
(Actual changes too large to list in the commit message;
see ChangeLog.)
From-SVN: r91270
Diffstat (limited to 'libjava/java/lang/VMClassLoader.java')
-rw-r--r-- | libjava/java/lang/VMClassLoader.java | 47 |
1 files changed, 17 insertions, 30 deletions
diff --git a/libjava/java/lang/VMClassLoader.java b/libjava/java/lang/VMClassLoader.java index ac7a05e..8f78f9b 100644 --- a/libjava/java/lang/VMClassLoader.java +++ b/libjava/java/lang/VMClassLoader.java @@ -97,44 +97,31 @@ final class VMClassLoader ProtectionDomain pd) throws ClassFormatError; - static final native void linkClass0 (Class klass); - static final native void markClassErrorState0 (Class klass); - /** * Helper to resolve all references to other classes from this class. * * @param c the class to resolve */ - static final void resolveClass(Class clazz) + static final native void resolveClass(Class clazz); + + static final void transformException(Class clazz, Throwable x) { - synchronized (clazz) + LinkageError e; + if (x instanceof LinkageError) + e = (LinkageError) x; + else if (x instanceof ClassNotFoundException) { - try - { - linkClass0 (clazz); - } - catch (Throwable x) - { - markClassErrorState0 (clazz); - - LinkageError e; - if (x instanceof LinkageError) - e = (LinkageError) x; - else if (x instanceof ClassNotFoundException) - { - e = new NoClassDefFoundError("while resolving class: " - + clazz.getName()); - e.initCause (x); - } - else - { - e = new LinkageError ("unexpected exception during linking: " - + clazz.getName()); - e.initCause (x); - } - throw e; - } + e = new NoClassDefFoundError("while resolving class: " + + clazz.getName()); + e.initCause (x); + } + else + { + e = new LinkageError ("unexpected exception during linking: " + + clazz.getName()); + e.initCause (x); } + throw e; } /** |