* src/vm/javaobjects.cpp (java_lang_reflect_Method::invoke): [OPENJDK] stack
authorStefan Ring <stefan@complang.tuwien.ac.at>
Sun, 28 Aug 2011 19:36:31 +0000 (21:36 +0200)
committerStefan Ring <stefan@complang.tuwien.ac.at>
Sun, 28 Aug 2011 19:36:31 +0000 (21:36 +0200)
index of caller was off by one, causing many apt (Annotation Processing Tool)
failures.

src/vm/javaobjects.cpp

index cb862ee2c5d3dc91dc477d86a84820b8b6127911..2d24815118656449d462168210007b023fe7f98b 100644 (file)
@@ -169,11 +169,11 @@ java_handle_t* java_lang_reflect_Method::invoke(java_handle_t* o, java_handle_ob
                if (!access_check_method(m, 2))
                        return NULL;
 #elif defined(WITH_JAVA_RUNTIME_LIBRARY_OPENJDK)
-               /* We only pass 1 here as stacktrace_get_caller_class, which
+               /* We only pass 0 here as stacktrace_get_caller_class, which
                   is called from access_check_method, skips
                   java.lang.reflect.Method.invoke(). */
 
-               if (!access_check_method(m, 1))
+               if (!access_check_method(m, 0))
                        return NULL;
 #else
 # error unknown classpath configuration