[kaffe] CVS kaffe (guilhem): Fix for bug #69
Kaffe CVS
cvs-commits at kaffe.org
Fri Oct 6 11:59:05 PDT 2006
PatchSet 7430
Date: 2006/10/06 18:50:53
Author: guilhem
Branch: HEAD
Tag: (none)
Log:
Fix for bug #69
2006-10-06 Guilhem Lavaux <guilhem at kaffe.org>
* kaffe/kaffevm/jni/jni-helpers.c
(KaffeJNI_ToReflectedMethod, KaffeJNI_ToReflectedField): Iterate
over all superclasses of a given class to find the given field or
method.
Fix bug #69.
Members:
ChangeLog:1.4930->1.4931
kaffe/kaffevm/jni/jni-helpers.c:1.15->1.16
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4930 kaffe/ChangeLog:1.4931
--- kaffe/ChangeLog:1.4930 Sat Sep 30 20:21:48 2006
+++ kaffe/ChangeLog Fri Oct 6 18:50:53 2006
@@ -1,3 +1,12 @@
+2006-10-06 Guilhem Lavaux <guilhem at kaffe.org>
+
+ * kaffe/kaffevm/jni/jni-helpers.c
+ (KaffeJNI_ToReflectedMethod, KaffeJNI_ToReflectedField): Iterate
+ over all superclasses of a given class to find the given field or
+ method.
+
+ Fix bug #69.
+
2006-09-30 Guilhem Lavaux <guilhem at kaffe.org>
* kaffe/kaffevm/jar.c
Index: kaffe/kaffe/kaffevm/jni/jni-helpers.c
diff -u kaffe/kaffe/kaffevm/jni/jni-helpers.c:1.15 kaffe/kaffe/kaffevm/jni/jni-helpers.c:1.16
--- kaffe/kaffe/kaffevm/jni/jni-helpers.c:1.15 Sun Jun 11 23:12:11 2006
+++ kaffe/kaffe/kaffevm/jni/jni-helpers.c Fri Oct 6 18:50:58 2006
@@ -155,16 +155,22 @@
cls_local = unveil(cls);
clazz = (Hjava_lang_Class *)cls_local;
refMeth = NULL;
- for (allMethods = Kaffe_get_class_methods(clazz), i = 0;
- i < CLASS_NMETHODS(clazz);
- i++, allMethods++)
+ do
{
- if (allMethods == (Method *)mid)
+ for (allMethods = Kaffe_get_class_methods(clazz), i = 0;
+ i < CLASS_NMETHODS(clazz);
+ i++, allMethods++)
{
- refMeth = KaffeVM_makeReflectMethod(clazz, i);
- break;
+ if (allMethods == (Method *)mid)
+ {
+ refMeth = KaffeVM_makeReflectMethod(clazz, i);
+ break;
+ }
}
+ clazz = clazz->superclass;
}
+ while (clazz != NULL && refMeth == NULL);
+
END_EXCEPTION_HANDLING();
return (jobject) refMeth;
@@ -184,16 +190,21 @@
cls_local = unveil(cls);
clazz = (Hjava_lang_Class *)cls_local;
refField = NULL;
- for (allFields = CLASS_FIELDS(clazz), i = 0;
- i < CLASS_NFIELDS(clazz);
- i++, allFields++)
+ do
{
- if (allFields == (Field *)fid)
+ for (allFields = CLASS_FIELDS(clazz), i = 0;
+ i < CLASS_NFIELDS(clazz);
+ i++, allFields++)
{
- refField = KaffeVM_makeReflectField(clazz, i);
- break;
+ if (allFields == (Field *)fid)
+ {
+ refField = KaffeVM_makeReflectField(clazz, i);
+ break;
+ }
}
+ clazz = clazz->superclass;
}
+ while (clazz != NULL && refField == NULL);
END_EXCEPTION_HANDLING();
More information about the kaffe
mailing list