@@ -3539,9 +3539,7 @@ void InstanceKlass::print_on(outputStream* st) const {
3539
3539
}
3540
3540
}
3541
3541
}
3542
- if (default_vtable_indices () != nullptr ) {
3543
- st->print (BULLET" default vtable indices: " ); default_vtable_indices ()->print_value_on (st); st->cr ();
3544
- }
3542
+ print_on_maybe_null (st, BULLET" default vtable indices: " , default_vtable_indices ());
3545
3543
st->print (BULLET" local interfaces: " ); local_interfaces ()->print_value_on (st); st->cr ();
3546
3544
st->print (BULLET" trans. interfaces: " ); transitive_interfaces ()->print_value_on (st); st->cr ();
3547
3545
@@ -3568,25 +3566,18 @@ void InstanceKlass::print_on(outputStream* st) const {
3568
3566
}
3569
3567
}
3570
3568
st->print (BULLET" constants: " ); constants ()->print_value_on (st); st->cr ();
3571
- if (class_loader_data () != nullptr ) {
3572
- st->print (BULLET" class loader data: " );
3573
- class_loader_data ()->print_value_on (st);
3574
- st->cr ();
3575
- }
3576
- if (source_file_name () != nullptr ) {
3577
- st->print (BULLET" source file: " );
3578
- source_file_name ()->print_value_on (st);
3579
- st->cr ();
3580
- }
3569
+
3570
+ print_on_maybe_null (st, BULLET" class loader data: " , class_loader_data ());
3571
+ print_on_maybe_null (st, BULLET" source file: " , source_file_name ());
3581
3572
if (source_debug_extension () != nullptr ) {
3582
3573
st->print (BULLET" source debug extension: " );
3583
3574
st->print (" %s" , source_debug_extension ());
3584
3575
st->cr ();
3585
3576
}
3586
- st-> print ( BULLET" class annotations: " ); class_annotations ()-> print_value_on (st); st-> cr ( );
3587
- st-> print ( BULLET" class type annotations: " ); class_type_annotations ()-> print_value_on (st); st-> cr ( );
3588
- st-> print ( BULLET" field annotations: " ); fields_annotations ()-> print_value_on (st); st-> cr ( );
3589
- st-> print ( BULLET" field type annotations: " ); fields_type_annotations ()-> print_value_on (st); st-> cr ( );
3577
+ print_on_maybe_null (st, BULLET" class annotations: " , class_annotations ());
3578
+ print_on_maybe_null (st, BULLET" class type annotations: " , class_type_annotations ());
3579
+ print_on_maybe_null (st, BULLET" field annotations: " , fields_annotations ());
3580
+ print_on_maybe_null (st, BULLET" field type annotations: " , fields_type_annotations ());
3590
3581
{
3591
3582
bool have_pv = false ;
3592
3583
// previous versions are linked together through the InstanceKlass
@@ -3601,16 +3592,10 @@ void InstanceKlass::print_on(outputStream* st) const {
3601
3592
if (have_pv) st->cr ();
3602
3593
}
3603
3594
3604
- if (generic_signature () != nullptr ) {
3605
- st->print (BULLET" generic signature: " );
3606
- generic_signature ()->print_value_on (st);
3607
- st->cr ();
3608
- }
3595
+ print_on_maybe_null (st, BULLET" generic signature: " , generic_signature ());
3609
3596
st->print (BULLET" inner classes: " ); inner_classes ()->print_value_on (st); st->cr ();
3610
3597
st->print (BULLET" nest members: " ); nest_members ()->print_value_on (st); st->cr ();
3611
- if (record_components () != nullptr ) {
3612
- st->print (BULLET" record components: " ); record_components ()->print_value_on (st); st->cr ();
3613
- }
3598
+ print_on_maybe_null (st, BULLET" record components: " , record_components ());
3614
3599
st->print (BULLET" permitted subclasses: " ); permitted_subclasses ()->print_value_on (st); st->cr ();
3615
3600
if (java_mirror () != nullptr ) {
3616
3601
st->print (BULLET" java mirror: " );
0 commit comments