Raji Sankar created SANDBOX-420:
-----------------------------------
Summary: Javaflow has a problem when the suspended function is
invoked using reflection
Key: SANDBOX-420
URL: https://issues.apache.org/jira/browse/SANDBOX-420
Project: Commons Sandbox
Issue Type: Bug
Components: Javaflow
Affects Versions: CSV 1.0
Environment: Debian linux using Sun JDK 1.6 and asm 4.0_RC2
Reporter: Raji Sankar
Priority: Minor
I have a fn which has a code as below:
private void callsomeshared()
throws Exception
{
Method mthd = _someShared.getDeclaredMethod("doSomething");
int cnt = 0;
while (cnt < 10)
{
mthd.invoke(_shared);
//Continuation.suspend();
cnt++;
}
}
The doSomething does this:
public boolean doSomething()
throws Exception
{
if (_shared.value() < 10)
{
_shared.echo();
Continuation.suspend();
}
return (_shared.value() < 10);
}
Doing this, fails with a ClassCastException, since when it hits the
Method.invoke, it is potentially popping out the AnotherLoader class and does
not have the Method class pushed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira