mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8000725: NPG: method_holder() and pool_holder() and pool_holder field should be InstanceKlass
Change types of above methods and field to InstanceKlass and remove unneeded casts from the source files. Reviewed-by: dholmes, coleenp, zgu
This commit is contained in:
parent
e1d995ab86
commit
7fee66f152
39 changed files with 176 additions and 179 deletions
|
@ -36,7 +36,7 @@
|
|||
|
||||
|
||||
oop fieldDescriptor::loader() const {
|
||||
return InstanceKlass::cast(_cp->pool_holder())->class_loader();
|
||||
return _cp->pool_holder()->class_loader();
|
||||
}
|
||||
|
||||
Symbol* fieldDescriptor::generic_signature() const {
|
||||
|
@ -45,7 +45,7 @@ Symbol* fieldDescriptor::generic_signature() const {
|
|||
}
|
||||
|
||||
int idx = 0;
|
||||
InstanceKlass* ik = InstanceKlass::cast(field_holder());
|
||||
InstanceKlass* ik = field_holder();
|
||||
for (AllFieldStream fs(ik); !fs.done(); fs.next()) {
|
||||
if (idx == _index) {
|
||||
return fs.generic_signature();
|
||||
|
@ -58,7 +58,7 @@ Symbol* fieldDescriptor::generic_signature() const {
|
|||
}
|
||||
|
||||
AnnotationArray* fieldDescriptor::annotations() const {
|
||||
InstanceKlass* ik = InstanceKlass::cast(field_holder());
|
||||
InstanceKlass* ik = field_holder();
|
||||
Array<AnnotationArray*>* md = ik->fields_annotations();
|
||||
if (md == NULL)
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue