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
This commit is contained in:
parent
13148dd26a
commit
8b6e769053
9 changed files with 117 additions and 71 deletions
|
@ -252,27 +252,30 @@ _Jv_FindClass (_Jv_Utf8Const *name, java::lang::ClassLoader *loader)
|
|||
// Not even a bootstrap loader, try the built-in cache.
|
||||
klass = _Jv_FindClassInCache (name);
|
||||
|
||||
bool found = false;
|
||||
for (int i = 0; i < bootstrap_index; ++i)
|
||||
if (klass)
|
||||
{
|
||||
if (bootstrap_class_list[i] == klass)
|
||||
bool found = false;
|
||||
for (int i = 0; i < bootstrap_index; ++i)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
if (bootstrap_class_list[i] == klass)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (! found)
|
||||
{
|
||||
if (bootstrap_index == BOOTSTRAP_CLASS_LIST_SIZE)
|
||||
abort ();
|
||||
bootstrap_class_list[bootstrap_index++] = klass;
|
||||
}
|
||||
}
|
||||
if (! found)
|
||||
{
|
||||
if (bootstrap_index == BOOTSTRAP_CLASS_LIST_SIZE)
|
||||
abort ();
|
||||
bootstrap_class_list[bootstrap_index++] = klass;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// we need classes to be in the hash while
|
||||
// we're loading, so that they can refer to themselves.
|
||||
// We need classes to be in the hash while we're loading, so
|
||||
// that they can refer to themselves.
|
||||
_Jv_Linker::wait_for_state (klass, JV_STATE_LOADED);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue