* src/cacaoh/dummy.c (array_objectarray_element_set): Fixed for handles.
[cacao.git] / src / native / vm / gnu / java_lang_reflect_Constructor.c
index dda0424b546a2f4cbf30d96c68dea21139f6302b..c331a15dcf84568725422400910bf856004918e8 100644 (file)
@@ -47,6 +47,7 @@
 #include "native/include/java_lang_reflect_Constructor.h"
 
 #if defined(ENABLE_ANNOTATIONS)
+# include "native/include/java_util_Map.h"
 # include "native/include/sun_reflect_ConstantPool.h"
 
 # include "native/vm/reflect.h"
@@ -112,7 +113,7 @@ JNIEXPORT java_lang_Object* JNICALL Java_java_lang_reflect_Constructor_construct
  */
 JNIEXPORT struct java_util_Map* JNICALL Java_java_lang_reflect_Constructor_declaredAnnotations(JNIEnv *env, java_lang_reflect_Constructor *this)
 {
-       struct java_util_Map    *declaredAnnotations = NULL;
+       java_util_Map           *declaredAnnotations = NULL;
        java_handle_bytearray_t *annotations         = NULL;
        java_lang_Class         *declaringClass      = NULL;
        classinfo               *referer             = NULL;
@@ -120,7 +121,7 @@ JNIEXPORT struct java_util_Map* JNICALL Java_java_lang_reflect_Constructor_decla
        LLNI_field_get_ref(this, declaredAnnotations, declaredAnnotations);
 
        if (declaredAnnotations == NULL) {
-               LLNI_field_get_val(this, annotations, annotations);
+               LLNI_field_get_ref(this, annotations, annotations);
                LLNI_field_get_ref(this, clazz, declaringClass);
                LLNI_class_get(this, referer);