comparison src/share/vm/prims/jni.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 9855b7e559ae
children e522a00b91aa bd7a7ce2e264 070d523b96a7
comparison
equal deleted inserted replaced
6939:c284cf4781f0 6940:18fb7da42534
2983 !InstanceKlass::cast(k())->find_field(fieldname, signame, true, &fd)) { 2983 !InstanceKlass::cast(k())->find_field(fieldname, signame, true, &fd)) {
2984 THROW_MSG_0(vmSymbols::java_lang_NoSuchFieldError(), (char*) name); 2984 THROW_MSG_0(vmSymbols::java_lang_NoSuchFieldError(), (char*) name);
2985 } 2985 }
2986 2986
2987 // A jfieldID for a static field is a JNIid specifying the field holder and the offset within the Klass* 2987 // A jfieldID for a static field is a JNIid specifying the field holder and the offset within the Klass*
2988 JNIid* id = InstanceKlass::cast(fd.field_holder())->jni_id_for(fd.offset()); 2988 JNIid* id = fd.field_holder()->jni_id_for(fd.offset());
2989 debug_only(id->set_is_static_field_id();) 2989 debug_only(id->set_is_static_field_id();)
2990 2990
2991 debug_only(id->verify(fd.field_holder())); 2991 debug_only(id->verify(fd.field_holder()));
2992 2992
2993 ret = jfieldIDWorkaround::to_static_jfieldID(id); 2993 ret = jfieldIDWorkaround::to_static_jfieldID(id);
4014 method->clear_native_function(); 4014 method->clear_native_function();
4015 } 4015 }
4016 if (PrintJNIResolving) { 4016 if (PrintJNIResolving) {
4017 ResourceMark rm(THREAD); 4017 ResourceMark rm(THREAD);
4018 tty->print_cr("[Registering JNI native method %s.%s]", 4018 tty->print_cr("[Registering JNI native method %s.%s]",
4019 Klass::cast(method->method_holder())->external_name(), 4019 method->method_holder()->external_name(),
4020 method->name()->as_C_string()); 4020 method->name()->as_C_string());
4021 } 4021 }
4022 return true; 4022 return true;
4023 } 4023 }
4024 4024