8202171: Some oopDesc functions compare this with NULL

Add Method* parameter and made verify* methods static to avoid 'this' comparison with NULL, Added NULL checks before calling print_on() methods.

Reviewed-by: kbarrett, coleenp
This commit is contained in:
Harold Seigel 2018-07-31 14:24:10 -04:00
parent b71f3e7104
commit 38db1d1620
15 changed files with 73 additions and 39 deletions

View file

@ -443,8 +443,18 @@ void SystemDictionary::validate_protection_domain(InstanceKlass* klass,
// Print out trace information
LogStream ls(lt);
ls.print_cr("Checking package access");
ls.print("class loader: "); class_loader()->print_value_on(&ls);
ls.print(" protection domain: "); protection_domain()->print_value_on(&ls);
if (class_loader() != NULL) {
ls.print("class loader: ");
class_loader()->print_value_on(&ls);
} else {
ls.print_cr("class loader: NULL");
}
if (protection_domain() != NULL) {
ls.print(" protection domain: ");
protection_domain()->print_value_on(&ls);
} else {
ls.print_cr(" protection domain: NULL");
}
ls.print(" loading: "); klass->print_value_on(&ls);
ls.cr();
}