comparison src/share/vm/prims/jvm.cpp @ 8031:927a311d00f9

8007320: NPG: move method annotations Summary: allocate method annotations and attach to ConstMethod if present Reviewed-by: dcubed, jiangli, sspitsyn, iklam
author coleenp
date Mon, 11 Feb 2013 14:06:22 -0500
parents 41d73c9b30a8
children 5fc51c1ecdeb 2c7663baeb67 16885e702c88
comparison
equal deleted inserted replaced
8030:f989aff6946f 8031:927a311d00f9
1571 ResourceMark rm(THREAD); 1571 ResourceMark rm(THREAD);
1572 // Return null for arrays and primitives 1572 // Return null for arrays and primitives
1573 if (!java_lang_Class::is_primitive(JNIHandles::resolve(cls))) { 1573 if (!java_lang_Class::is_primitive(JNIHandles::resolve(cls))) {
1574 Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve(cls)); 1574 Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve(cls));
1575 if (k->oop_is_instance()) { 1575 if (k->oop_is_instance()) {
1576 Annotations* type_annotations = InstanceKlass::cast(k)->type_annotations(); 1576 AnnotationArray* type_annotations = InstanceKlass::cast(k)->class_type_annotations();
1577 if (type_annotations != NULL) { 1577 if (type_annotations != NULL) {
1578 typeArrayOop a = Annotations::make_java_array(type_annotations->class_annotations(), CHECK_NULL); 1578 typeArrayOop a = Annotations::make_java_array(type_annotations, CHECK_NULL);
1579 return (jbyteArray) JNIHandles::make_local(env, a); 1579 return (jbyteArray) JNIHandles::make_local(env, a);
1580 } 1580 }
1581 } 1581 }
1582 } 1582 }
1583 return NULL; 1583 return NULL;