mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8043454: Test case for 8037157 should not throw a VerifyError
Don't throw VerifyError if method is NULL. Reviewed-by: acorn, lfoltan, mschoene
This commit is contained in:
parent
2216f41ed6
commit
0cc38ff4d5
1 changed files with 13 additions and 15 deletions
|
@ -2311,11 +2311,8 @@ void ClassVerifier::verify_invoke_init(
|
|||
vmSymbols::object_initializer_name(),
|
||||
cp->signature_ref_at(bcs->get_index_u2()),
|
||||
Klass::normal);
|
||||
if (m == NULL) {
|
||||
verify_error(ErrorContext::bad_code(bci),
|
||||
"Call to missing <init> method");
|
||||
return;
|
||||
}
|
||||
// Do nothing if method is not found. Let resolution detect the error.
|
||||
if (m != NULL) {
|
||||
instanceKlassHandle mh(THREAD, m->method_holder());
|
||||
if (m->is_protected() && !mh->is_same_class_package(_klass())) {
|
||||
bool assignable = current_type().is_assignable_from(
|
||||
|
@ -2329,6 +2326,7 @@ void ClassVerifier::verify_invoke_init(
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
current_frame->initialize_object(type, new_class_type);
|
||||
} else {
|
||||
verify_error(ErrorContext::bad_type(bci, current_frame->stack_top_ctx()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue