Kohsuke,
I've noticed your comment in svn for ContinuationMethodAnalyzer class:
--
SimpleVerifier assumes that the types involved in the computation is
loadable through Class.forName(), which isn't true when we are running
inside Ant.
The correct computation would require us to parse referenced types
(through a pluggable resolver.) For now, I'm just replacing it with
BasicVerifier.
Given that the purpose of this part of the code is just to check that
we generated the right code, perhaps we can remove it altogether in
the production system?
i.e.,
if(DEBUG) {
... run a verifier
}
--
I mentioned before analyzer is used here to compute stack and
locals slots for method instructions in order to be able to
restore/cast to correct types when restoring continuation.
Speaking about Ant, can you tell me how can I test this issue? Or
maybe you can subclass SimpleVerifier yourself and overwrite following
method:
protected Class getClass(final Type t) {
try {
if (t.getSort() == Type.ARRAY) {
return getClass()
.getClassLoader()
.loadClass(t.getDescriptor().replace('/', '.'));
}
return getClass()
.getClassLoader()
.loadClass(t.getClassName());
} catch (ClassNotFoundException e) {
throw new RuntimeException(e.toString());
}
}
Eric, I actually wonder if we can use
getClass().getClassLoader().loadClass(...) (or
Thread.currentThread().contextClassLoader().loadClass(...)) instead of
Class.forName(...) method? Do you recall if there was some reasons to
use Class.forName?
regards,
Eugene
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]