mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8007320: NPG: move method annotations
Allocate method annotations and attach to ConstMethod if present Reviewed-by: dcubed, jiangli, sspitsyn, iklam
This commit is contained in:
parent
ee53020f94
commit
faea95b8d3
19 changed files with 862 additions and 838 deletions
|
@ -1573,9 +1573,9 @@ JVM_ENTRY(jbyteArray, JVM_GetClassTypeAnnotations(JNIEnv *env, jclass cls))
|
|||
if (!java_lang_Class::is_primitive(JNIHandles::resolve(cls))) {
|
||||
Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve(cls));
|
||||
if (k->oop_is_instance()) {
|
||||
Annotations* type_annotations = InstanceKlass::cast(k)->type_annotations();
|
||||
AnnotationArray* type_annotations = InstanceKlass::cast(k)->class_type_annotations();
|
||||
if (type_annotations != NULL) {
|
||||
typeArrayOop a = Annotations::make_java_array(type_annotations->class_annotations(), CHECK_NULL);
|
||||
typeArrayOop a = Annotations::make_java_array(type_annotations, CHECK_NULL);
|
||||
return (jbyteArray) JNIHandles::make_local(env, a);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue