harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r549487 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_vm_VMGenericsAndAnnotations.cpp
Date Thu, 21 Jun 2007 14:05:26 GMT
Author: gshimansky
Date: Thu Jun 21 07:05:25 2007
New Revision: 549487

URL: http://svn.apache.org/viewvc?view=rev&rev=549487
Log:
Applied HARMONY-4230
[drlvm][kernel][reliability] assert in getParameterAnnotations function


Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_vm_VMGenericsAndAnnotations.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_vm_VMGenericsAndAnnotations.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_vm_VMGenericsAndAnnotations.cpp?view=diff&rev=549487&r1=549486&r2=549487
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_vm_VMGenericsAndAnnotations.cpp
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_vm_VMGenericsAndAnnotations.cpp
Thu Jun 21 07:05:25 2007
@@ -83,8 +83,11 @@
     Method* method = (Method*) ((POINTER_SIZE_INT) jmethod);
     Class* declaring_class = method->get_class();
 
-    static Class* array_class = genv->LoadCoreClass(
-        "[Ljava/lang/annotation/Annotation;");
+    static Class* array_class;
+    if(array_class == NULL) {
+        array_class = genv->LoadCoreClass(
+            "[Ljava/lang/annotation/Annotation;");
+    }
 
     unsigned param_num = method->get_num_param_annotations();
     unsigned num = param_num + method->get_num_invisible_param_annotations();
@@ -95,8 +98,12 @@
     if (num == 0) {
         unsigned nparams = (method->get_num_args() - (method->is_static() ? 0 : 1));
         if (nparams > 0) {
-            static Class* antn_class = jni_get_vm_env(jenv)->LoadCoreClass(
-                "java/lang/annotation/Annotation");
+            static Class* antn_class;
+            if(antn_class == NULL) {
+                antn_class = jni_get_vm_env(jenv)->LoadCoreClass(
+                    "java/lang/annotation/Annotation");
+            }
+
             array = NewObjectArray(jenv, nparams, 
                 struct_Class_to_java_lang_Class_Handle(array_class), NewObjectArray(jenv,
0, 
                     struct_Class_to_java_lang_Class_Handle(antn_class), NULL));



Mime
View raw message