This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Bug: LoadClass ("[B") etc doesn't work
- From: Tom Tromey <tromey at redhat dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: java at gcc dot gnu dot org
- Date: 04 Apr 2005 12:20:06 -0600
- Subject: Re: Bug: LoadClass ("[B") etc doesn't work
- References: <16977.30804.41297.913081@cuddles.cambridge.redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
Andrew> This is a fairly evil hack that seems to fix things.
I thought perhaps this should go in VMClassLoader.loadClass, but I
think that fails since we don't know the proper class loader for the
array at that point.
ClassLoader.loadClassFromSig should just call
_Jv_FindClassFromSignature. And, it shouldn't bother with the
'resolve' argument at all -- leave resolution to loadClass() itself.
(I'm checking in a small patch from Classpath that restructures
loadClass to make this more obvious.)
Hmm, _Jv_FindClassFromSignature won't do the right thing for certain
malformed signatures, like "[Lfoo". It should probably throw an error
rather than return NULL. It could also iterate rather than recurse,
just as a micro-optimization. I'm going to file this in bugzilla.
Tom