* src/native/vm/java_lang_Class.c (_Jv_java_lang_Class_getDeclaredAnnotations):
authorMathias Panzenboeck <e0427417@student.tuwien.ac.at>
Tue, 28 Aug 2007 16:46:14 +0000 (18:46 +0200)
committerMathias Panzenboeck <e0427417@student.tuwien.ac.at>
Tue, 28 Aug 2007 16:46:14 +0000 (18:46 +0200)
Removed unnecessary exceptions_get_exception() check.

* src/vmcore/annotation.c (annotation_bytearrays_resize): Fixed comment.

src/native/vm/java_lang_Class.c
src/vmcore/annotation.c

index 2240817e5637120fd53428a6870b4185d7a8e64d..314c20fbce56f6a6c013d5dd08dfbcba822765c6 100644 (file)
@@ -637,12 +637,6 @@ java_handle_objectarray_t *_Jv_java_lang_Class_getDeclaredAnnotations(java_lang_
        /* get annotations: */
        annotations = class_get_annotations(c);
 
-       if (exceptions_get_exception() != NULL) {
-               /* the only exception possible here should be a out of memory exception
-                * raised by copying the annotations into a new java bytearray */
-               return NULL;
-       }
-
        constantPool = 
                (sun_reflect_ConstantPool*)native_new_and_init(
                        class_sun_reflect_ConstantPool);
index 426cfce8e5a708bcaec479c482e3c73ec0ff0cda..31657d54c554d908829f0101625d2e85dd03cda9 100644 (file)
@@ -65,10 +65,10 @@ static bool annotation_bytearrays_resize(java_handle_objectarray_t **bas,
        
        assert(bas != NULL);
        
-       /* if the size already fits do nothing */
        if (*bas != NULL) {
                oldsize = array_length_get((java_handle_t*)*bas);
 
+               /* if the size already fits do nothing */
                if (size == oldsize) {
                        return true;
                }