You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Raji Sankar (JIRA)" <ji...@apache.org> on 2012/06/14 12:01:43 UTC
[jira] [Updated] (SANDBOX-420) Javaflow has a problem when the
suspended function is invoked using reflection
[ https://issues.apache.org/jira/browse/SANDBOX-420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Raji Sankar updated SANDBOX-420:
--------------------------------
Attachment: ContinueReflection.java
ContinuationMethodAnalyzer.java
ContinuationMethodAdapter.java
Changes Commented with //RS
> 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
> Attachments: ContinuationMethodAdapter.java, ContinuationMethodAnalyzer.java, ContinueReflection.java
>
>
> 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