This commit is contained in:
Bengt Rutisson 2013-01-18 11:03:15 +01:00
commit f3576a18a9
17 changed files with 102 additions and 136 deletions

View file

@ -1582,8 +1582,11 @@ 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()) {
typeArrayOop a = Annotations::make_java_array(InstanceKlass::cast(k)->type_annotations()->class_annotations(), CHECK_NULL);
return (jbyteArray) JNIHandles::make_local(env, a);
Annotations* type_annotations = InstanceKlass::cast(k)->type_annotations();
if (type_annotations != NULL) {
typeArrayOop a = Annotations::make_java_array(type_annotations->class_annotations(), CHECK_NULL);
return (jbyteArray) JNIHandles::make_local(env, a);
}
}
}
return NULL;