Patch: this morning's reflection fixes
Tom Tromey
tromey@cygnus.com
Thu Jan 6 10:16:00 GMT 2000
I'm committing the appended patch. This fixes the remaining Mauve
reflection failures; now the java.lang.Class.reflection and
java.lang.reflect.Method.invoke tests pass completely.
2000-01-06 Tom Tromey <tromey@cygnus.com>
* java/lang/natClass.cc (_getConstructors): Correctly check
whether method name is the init name.
(getMethod): Look at accflags on method in `klass', not `this'.
Tom
Index: java/lang/natClass.cc
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/lang/natClass.cc,v
retrieving revision 1.13
diff -u -r1.13 natClass.cc
--- natClass.cc 2000/01/06 00:56:21 1.13
+++ natClass.cc 2000/01/06 18:15:45
@@ -139,7 +139,7 @@
{
_Jv_Method *method = &methods[i];
if (method->name == NULL
- && ! _Jv_equalUtf8Consts (method->name, init_name))
+ || ! _Jv_equalUtf8Consts (method->name, init_name))
continue;
if (! declared
&& ! java::lang::reflect::Modifier::isPublic(method->accflags))
@@ -154,7 +154,7 @@
{
_Jv_Method *method = &methods[i];
if (method->name == NULL
- && ! _Jv_equalUtf8Consts (method->name, init_name))
+ || ! _Jv_equalUtf8Consts (method->name, init_name))
continue;
if (! declared
&& ! java::lang::reflect::Modifier::isPublic(method->accflags))
@@ -473,7 +473,7 @@
using namespace java::lang::reflect;
// Method must be public.
- if (! Modifier::isPublic (methods[i].accflags))
+ if (! Modifier::isPublic (klass->methods[i].accflags))
break;
Method *rmethod = new Method ();
More information about the Java-patches
mailing list