diff options
author | Tom Tromey <tromey@redhat.com> | 2005-04-05 22:26:26 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2005-04-05 22:26:26 +0000 |
commit | 8b6e76905300f33b868a3619d416cc9285cbfee1 (patch) | |
tree | 2e7ab5655ae0f92acaf1825446f2fec39bb2a56e /libjava/verify.cc | |
parent | 13148dd26aafe25ef31d5303f6383d464cc8db61 (diff) | |
download | gcc-8b6e76905300f33b868a3619d416cc9285cbfee1.zip gcc-8b6e76905300f33b868a3619d416cc9285cbfee1.tar.gz gcc-8b6e76905300f33b868a3619d416cc9285cbfee1.tar.bz2 |
jni.cc (_Jv_JNI_GetAnyFieldID): Throw ClassNotFoundException.
* jni.cc (_Jv_JNI_GetAnyFieldID): Throw ClassNotFoundException.
* java/lang/reflect/natMethod.cc (_Jv_GetTypesFromSignature):
Rewrote to use _Jv_FindClassFromSignature.
* verify.cc (resolve): throw NoClassDefFoundError.
* link.cc (resolve_field): Throw NoClassDefFoundError.
(find_field): Likewise.
* prims.cc (_Jv_FindClassFromSignature): Removed recursion.
Handle error cases. Added 'endp' argument.
* include/jvm.h (_Jv_FindClassFromSignature): Updated prototype.
From-SVN: r97660
Diffstat (limited to 'libjava/verify.cc')
-rw-r--r-- | libjava/verify.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libjava/verify.cc b/libjava/verify.cc index 141f27a..a47571b 100644 --- a/libjava/verify.cc +++ b/libjava/verify.cc @@ -31,6 +31,7 @@ details. */ #include <java/lang/Throwable.h> #include <java/lang/reflect/Modifier.h> #include <java/lang/StringBuffer.h> +#include <java/lang/NoClassDefFoundError.h> #ifdef VERIFY_DEBUG #include <stdio.h> @@ -368,7 +369,11 @@ private: = verifier->current_class->getClassLoaderInternal(); // We might see either kind of name. Sigh. if (data.name->first() == 'L' && data.name->limit()[-1] == ';') - data.klass = _Jv_FindClassFromSignature (data.name->chars(), loader); + { + data.klass = _Jv_FindClassFromSignature (data.name->chars(), loader); + if (data.klass == NULL) + throw new java::lang::NoClassDefFoundError(data.name->toString()); + } else data.klass = Class::forName (_Jv_NewStringUtf8Const (data.name), false, loader); |