diff src/share/vm/runtime/fieldDescriptor.cpp @ 6940:18fb7da42534

8000725: NPG: method_holder() and pool_holder() and pool_holder field should be InstanceKlass Summary: Change types of above methods and field to InstanceKlass and remove unneeded casts from the source files. Reviewed-by: dholmes, coleenp, zgu Contributed-by: harold.seigel@oracle.com
author coleenp
date Tue, 06 Nov 2012 15:09:37 -0500
parents da91efe96a93
children 35431a769282
line wrap: on
line diff
--- a/src/share/vm/runtime/fieldDescriptor.cpp	Thu Oct 04 14:55:57 2012 +0200
+++ b/src/share/vm/runtime/fieldDescriptor.cpp	Tue Nov 06 15:09:37 2012 -0500
@@ -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 @@
   }
 
   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 @@
 }
 
 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;