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]
Other format: [Raw text]

Re: Bug: LoadClass ("[B") etc doesn't work


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


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