Skip to content

Commit

Permalink
8344763: cpCache print_on doesn't handle nulls
Browse files Browse the repository at this point in the history
Reviewed-by: matsaave
  • Loading branch information
coleenp committed Nov 21, 2024
1 parent dc9a6ef commit 93d4ad4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/hotspot/share/oops/cpCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 93d4ad4

Please sign in to comment.