diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-05 22:26:26 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-05 22:26:26 +0000 |
commit | be7d01ed62d74d9c4b7b53f96bb82c8f109f859e (patch) | |
tree | 2e7ab5655ae0f92acaf1825446f2fec39bb2a56e /libjava/verify.cc | |
parent | 9f587d943d2e682a674b64bb64f0086318dc8eb7 (diff) | |
download | gcc-be7d01ed62d74d9c4b7b53f96bb82c8f109f859e.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97660 138bc75d-0d04-0410-961f-82ee72b054a4
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 141f27af797..a47571bb809 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); |