mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
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:
parent
b71f3e7104
commit
38db1d1620
15 changed files with 73 additions and 39 deletions
|
@ -188,12 +188,20 @@ void fieldDescriptor::print_on_for(outputStream* st, oop obj) {
|
|||
case T_ARRAY:
|
||||
st->print(" ");
|
||||
NOT_LP64(as_int = obj->int_field(offset()));
|
||||
obj->obj_field(offset())->print_value_on(st);
|
||||
if (obj->obj_field(offset()) != NULL) {
|
||||
obj->obj_field(offset())->print_value_on(st);
|
||||
} else {
|
||||
st->print_cr("NULL");
|
||||
}
|
||||
break;
|
||||
case T_OBJECT:
|
||||
st->print(" ");
|
||||
NOT_LP64(as_int = obj->int_field(offset()));
|
||||
obj->obj_field(offset())->print_value_on(st);
|
||||
if (obj->obj_field(offset()) != NULL) {
|
||||
obj->obj_field(offset())->print_value_on(st);
|
||||
} else {
|
||||
st->print_cr("NULL");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue