equal
deleted
inserted
replaced
1580 ResourceMark rm(THREAD); |
1580 ResourceMark rm(THREAD); |
1581 // Return null for arrays and primitives |
1581 // Return null for arrays and primitives |
1582 if (!java_lang_Class::is_primitive(JNIHandles::resolve(cls))) { |
1582 if (!java_lang_Class::is_primitive(JNIHandles::resolve(cls))) { |
1583 Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve(cls)); |
1583 Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve(cls)); |
1584 if (k->oop_is_instance()) { |
1584 if (k->oop_is_instance()) { |
1585 typeArrayOop a = Annotations::make_java_array(InstanceKlass::cast(k)->type_annotations()->class_annotations(), CHECK_NULL); |
1585 Annotations* type_annotations = InstanceKlass::cast(k)->type_annotations(); |
1586 return (jbyteArray) JNIHandles::make_local(env, a); |
1586 if (type_annotations != NULL) { |
|
1587 typeArrayOop a = Annotations::make_java_array(type_annotations->class_annotations(), CHECK_NULL); |
|
1588 return (jbyteArray) JNIHandles::make_local(env, a); |
|
1589 } |
1587 } |
1590 } |
1588 } |
1591 } |
1589 return NULL; |
1592 return NULL; |
1590 JVM_END |
1593 JVM_END |
1591 |
1594 |