diff src/share/vm/prims/jvm.cpp @ 7615:f422634e5828

Merge
author brutisso
date Fri, 18 Jan 2013 11:03:15 +0100
parents f9eb431c3efe ff0a7943fd29
children c73c3f2c5b3b
line wrap: on
line diff
--- a/src/share/vm/prims/jvm.cpp	Thu Jan 17 18:47:36 2013 -0800
+++ b/src/share/vm/prims/jvm.cpp	Fri Jan 18 11:03:15 2013 +0100
@@ -1582,8 +1582,11 @@
   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;