8344763: cpCache print_on doesn't handle nulls

Reviewed-by: matsaave
This commit is contained in:
Coleen Phillimore 2024-11-21 18:26:23 +00:00
parent dc9a6ef610
commit 93d4ad4dd4

View File

@ -829,9 +829,15 @@ oop ConstantPoolCache::appendix_if_resolved(ResolvedMethodEntry* method_entry) c
void ConstantPoolCache::print_on(outputStream* st) const {
st->print_cr("%s", internal_name());
// print constant pool cache entries
print_resolved_field_entries(st);
print_resolved_method_entries(st);
print_resolved_indy_entries(st);
if (_resolved_field_entries != nullptr) {
print_resolved_field_entries(st);
}
if (_resolved_method_entries != nullptr) {
print_resolved_method_entries(st);
}
if (_resolved_indy_entries != nullptr) {
print_resolved_indy_entries(st);
}
}
void ConstantPoolCache::print_resolved_field_entries(outputStream* st) const {