commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fernando Petrola (JIRA)" <j...@apache.org>
Subject [jira] Created: (SANDBOX-277) [javaflow] Uninitialize local variable related bug
Date Sun, 01 Feb 2009 23:26:02 GMT
[javaflow] Uninitialize local variable related bug
--------------------------------------------------

                 Key: SANDBOX-277
                 URL: https://issues.apache.org/jira/browse/SANDBOX-277
             Project: Commons Sandbox
          Issue Type: Bug
          Components: Javaflow
            Reporter: Fernando Petrola
            Priority: Critical


Executing this test class:

------------------------------------------------------------------------------------------------------------------------------------------------
package test;

import java.net.URL;
import org.apache.commons.javaflow.Continuation;
import org.apache.commons.javaflow.ContinuationClassLoader;

public class TestNullBug
{
    public static class Test implements Runnable
    {
	public class NullLocalVariable
	{
	    protected Integer i;

	    public Integer method1()
	    {
		Integer result= null;
		if (i == 0)
		    result= i;

		return result;
	    }
	}

	public void run()
	{
	    NullLocalVariable bug1= new NullLocalVariable();
	}
    }

    public static void main(String[] args) throws Exception
    {
	ContinuationClassLoader classLoader= new ContinuationClassLoader(new URL[] {}, TestNullBug.Test.class.getClassLoader());
	classLoader.addLoaderPackageRoot(TestNullBug.Test.class.getPackage().getName());
	Runnable test= (Runnable) classLoader.loadClass(TestNullBug.Test.class.getName()).newInstance();
	Continuation.startWith(test);
    }
}
------------------------------------------------------------------------------------------------------------------------------------------------

I get the following stacktrace:

Exception in thread "main" java.lang.NoClassDefFoundError: null
	at test.TestNullBug$Test.run(TestNullBug.java:28)
	at org.apache.commons.javaflow.bytecode.StackRecorder.execute(StackRecorder.java:104)
	at org.apache.commons.javaflow.Continuation.continueWith(Continuation.java:182)
	at org.apache.commons.javaflow.Continuation.startWith(Continuation.java:136)
	at org.apache.commons.javaflow.Continuation.startWith(Continuation.java:107)
	at test.TestNullBug.main(TestNullBug.java:37)
Caused by: java.lang.ClassNotFoundException: null
	at org.apache.commons.javaflow.ContinuationClassLoader.findClass(ContinuationClassLoader.java:419)
	at org.apache.commons.javaflow.ContinuationClassLoader.loadClass(ContinuationClassLoader.java:306)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
	... 6 more


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message