This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: JNI field validation?


"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 ]



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]