diff --git a/libjava/ChangeLog b/libjava/ChangeLog index b2a0141ec88..10b7ab6085d 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2003-10-30 Bryce McKinlay + + * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Don't use vtable + dispatch for final methods. + 2003-10-30 Thomas Fitzsimmons * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c (create): Turn on diff --git a/libjava/java/lang/reflect/natMethod.cc b/libjava/java/lang/reflect/natMethod.cc index 525a4a0e9c9..ed122ea2441 100644 --- a/libjava/java/lang/reflect/natMethod.cc +++ b/libjava/java/lang/reflect/natMethod.cc @@ -343,6 +343,8 @@ _Jv_CallAnyMethodA (jobject obj, jvalue *result, jboolean is_jni_call) { + using namespace java::lang::reflect; + #ifdef USE_LIBFFI JvAssert (! is_constructor || ! obj); JvAssert (! is_constructor || return_type); @@ -351,7 +353,7 @@ _Jv_CallAnyMethodA (jobject obj, // constructor does need a `this' argument, but it is one we create. jboolean needs_this = false; if (is_constructor - || ! java::lang::reflect::Modifier::isStatic(meth->accflags)) + || ! Modifier::isStatic(meth->accflags)) needs_this = true; int param_count = parameter_types->length; @@ -464,7 +466,7 @@ _Jv_CallAnyMethodA (jobject obj, void *ncode; - if (is_virtual_call) + if (is_virtual_call && ! Modifier::isFinal (meth->accflags)) { _Jv_VTable *vtable = *(_Jv_VTable **) obj; ncode = vtable->get_method (meth->index);