8268522: InstanceKlass::can_be_verified_at_dumptime() returns opposite value

Reviewed-by: dholmes, minqi, iklam
This commit is contained in:
Calvin Cheung 2021-06-14 15:02:55 +00:00
parent abe20c188c
commit c088d093e2
8 changed files with 25 additions and 25 deletions

View file

@ -2403,8 +2403,8 @@ void InstanceKlass::metaspace_pointers_do(MetaspaceClosure* it) {
void InstanceKlass::remove_unshareable_info() {
if (can_be_verified_at_dumptime()) {
// Set the old class bit.
set_is_shared_old_klass();
// Remember this so we can avoid walking the hierarchy at runtime.
set_verified_at_dump_time();
}
Klass::remove_unshareable_info();
@ -2549,19 +2549,19 @@ void InstanceKlass::restore_unshareable_info(ClassLoaderData* loader_data, Handl
// Verification of archived old classes will be performed during run time.
bool InstanceKlass::can_be_verified_at_dumptime() const {
if (major_version() < 50 /*JAVA_6_VERSION*/) {
return true;
return false;
}
if (java_super() != NULL && java_super()->can_be_verified_at_dumptime()) {
return true;
if (java_super() != NULL && !java_super()->can_be_verified_at_dumptime()) {
return false;
}
Array<InstanceKlass*>* interfaces = local_interfaces();
int len = interfaces->length();
for (int i = 0; i < len; i++) {
if (interfaces->at(i)->can_be_verified_at_dumptime()) {
return true;
if (!interfaces->at(i)->can_be_verified_at_dumptime()) {
return false;
}
}
return false;
return true;
}
void InstanceKlass::set_shared_class_loader_type(s2 loader_type) {