* src/native/vm/gnu/java_lang_reflect_VMMethod.c (getDefaultValue):
authorChristian Thalinger <twisti@complang.tuwien.ac.at>
Sat, 26 Apr 2008 11:34:12 +0000 (13:34 +0200)
committerChristian Thalinger <twisti@complang.tuwien.ac.at>
Sat, 26 Apr 2008 11:34:12 +0000 (13:34 +0200)
Pass the correct method object to the Java method.

src/native/vm/gnu/java_lang_reflect_VMMethod.c

index e86c28046aa5493b8fa6ae6a25f4f971cc7cbd4a..8b1853f06237cfa4e10a9f4909ceb914593647a9 100644 (file)
@@ -244,6 +244,8 @@ JNIEXPORT struct java_lang_Object* JNICALL Java_java_lang_reflect_VMMethod_getDe
        java_lang_Class          *constantPoolOop = NULL;            /* methods declaring class                           */
        classinfo                *referer         = NULL;            /* class, which calles the annotation parser         */
                                                                     /* (for the parameter 'referer' of vm_call_method()) */
+       java_lang_reflect_Method* rm;
+       java_handle_t*            h;
 
        if (this == NULL) {
                exceptions_throw_nullpointerexception();
@@ -289,11 +291,12 @@ JNIEXPORT struct java_lang_Object* JNICALL Java_java_lang_reflect_VMMethod_getDe
                }
        }
 
+       LLNI_field_get_ref(this, m,                 rm);
        LLNI_field_get_ref(this, annotationDefault, annotationDefault);
 
-       return (java_lang_Object*)vm_call_method(
-               m_parseAnnotationDefault, NULL,
-               this, annotationDefault, constantPool);
+       h = vm_call_method(m_parseAnnotationDefault, NULL, rm, annotationDefault, constantPool);
+
+       return (java_lang_Object*) h;
 }