This is the mail archive of the kawa@sourceware.org mailing list for the Kawa 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: Kawa on Android - problems with kawa.standard.Scheme


On 03/01/2011 05:33 PM, Per Bothner wrote:
The problem appears to be the getContextClassLoader in
gnu/bytecode/ObjectType.java. If you get rid of the
special case for Android, then it should work:

public static ClassLoader getContextClassLoader ()
{
try
{
return Thread.currentThread().getContextClassLoader();
}

So the question is why did I make this special case for Android
in the first place? Perhaps earlier versions of Android needed it?

I checked in this fix.


I wasn't able to verify whether this fixes breaks older versions of
Android - I kept getting a VerifyError, so I dropped it for now.

I also changed LangObjType.java so it creates the PrimProcedure
objects (including the one that causes Path to be loaded) as needed,
rather than at startup time.  Maybe later I'll add a "cache" - though
perhaps waiting until we can use Java7 MethodHandles might make more
sense.

Note either of the two fixes (either ObjectType#getContextClassLoader
or to LangObjType.java) should fix the problem, but both changes
seemed reasonable.  Hopefully the LangObjType.java change will
reduce the likelihood of a problem with older Android versions.

(If someone wants to test older Android versions, that would
be much appreciated.)
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


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