This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: JNI field validation?
- To: "Marcus G. Daniels" <mgd at swarm dot org>
- Subject: Re: JNI field validation?
- From: Bryce McKinlay <bryce at albatross dot co dot nz>
- Date: Thu, 22 Mar 2001 17:28:37 +1200
- CC: java at gcc dot gnu dot org
- References: <rfin1ae8k6x.fsf@cathcart.sysc.pdx.edu>
"Marcus G. Daniels" wrote:
> In jni.cc, in the function _Jv_JNI_GetAnyFieldID, there's a check to see
> if the field type requested matches the one found while iterating
> through the fields. To do this it calls _Jv_FindClassFromSignature, but
> that doesn't handle array signatures like "[java/lang/Class;".
Well, it appears that it should:
jclass
_Jv_FindClassFromSignature (char *sig, java::lang::ClassLoader *loader)
{
switch (*sig)
{
....
case '[':
return _Jv_GetArrayClass (_Jv_FindClassFromSignature (&sig[1],
loader),
loader);
Or are you saying that it needs to substitute "/" for "." somewhere?
regards
[ bryce ]