natConstructor.cc (newInstance): Initialize class.

* java/lang/reflect/natConstructor.cc (newInstance): Initialize
	class.
	* java/lang/reflect/natMethod.cc (invoke): Initialize class.

From-SVN: r56624
This commit is contained in:
Tom Tromey 2002-08-27 23:57:17 +00:00 committed by Tom Tromey
parent 7ee425e4d4
commit f87999337a
3 changed files with 16 additions and 3 deletions

View file

@ -156,6 +156,13 @@ java::lang::reflect::Method::invoke (jobject obj, jobjectArray args)
// of the object.
meth = _Jv_LookupDeclaredMethod (k, meth->name, meth->signature);
}
else
{
// We have to initialize a static class. It is safe to do this
// here and not in _Jv_CallAnyMethodA because JNI initializes a
// class whenever a method lookup is done.
_Jv_InitClass (declaringClass);
}
return _Jv_CallAnyMethodA (obj, return_type, meth, false,
parameter_types, args);
@ -405,8 +412,6 @@ _Jv_CallAnyMethodA (jobject obj,
p += tsize;
}
// FIXME: initialize class here.
using namespace java::lang;
using namespace java::lang::reflect;