You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Fernando Petrola (JIRA)" <ji...@apache.org> on 2009/02/02 00:26:02 UTC
[jira] Created: (SANDBOX-277) [javaflow] Uninitialize local
variable related bug
[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.
[jira] Updated: (SANDBOX-277) [javaflow] Uninitialized local
variable related bug
Posted by "Fernando Petrola (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SANDBOX-277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fernando Petrola updated SANDBOX-277:
-------------------------------------
Description:
Executing this test class:
------------------------------------------------------------------------------------------------------------------------------------------------
package net.ar.mondes.flowee.continuation.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
{
public void method1()
{
Integer result= null;
if (result != 0)
result= 1;
}
}
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
was:
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
> [javaflow] Uninitialized 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 net.ar.mondes.flowee.continuation.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
> {
> public void method1()
> {
> Integer result= null;
> if (result != 0)
> result= 1;
> }
> }
> 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.
[jira] Updated: (SANDBOX-277) [javaflow] Uninitialized local
variable related bug
Posted by "Fernando Petrola (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SANDBOX-277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fernando Petrola updated SANDBOX-277:
-------------------------------------
Description:
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
{
public void method1()
{
Integer result= null;
if (result != 0)
result= 1;
}
}
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:23)
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:32)
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
was:
Executing this test class:
------------------------------------------------------------------------------------------------------------------------------------------------
package net.ar.mondes.flowee.continuation.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
{
public void method1()
{
Integer result= null;
if (result != 0)
result= 1;
}
}
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
> [javaflow] Uninitialized 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
> {
> public void method1()
> {
> Integer result= null;
> if (result != 0)
> result= 1;
> }
> }
> 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:23)
> 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:32)
> 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.
[jira] Commented: (SANDBOX-277) [javaflow] Uninitialized local
variable related bug
Posted by "Valery Silaev (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SANDBOX-277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12793773#action_12793773 ]
Valery Silaev commented on SANDBOX-277:
---------------------------------------
Patch is integrated in trunk -- please update sources from SVN and retest.
> [javaflow] Uninitialized 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
> Assignee: Torsten Curdt
> Priority: Critical
> Attachments: ContinuationMethodAdapter.java
>
>
> 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
> {
> public void method1()
> {
> Integer result= null;
> if (result != 0)
> result= 1;
> }
> }
> 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:23)
> 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:32)
> 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.
[jira] Closed: (SANDBOX-277) [javaflow] Uninitialized local
variable related bug
Posted by "Fernando Petrola (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SANDBOX-277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fernando Petrola closed SANDBOX-277.
------------------------------------
Resolution: Fixed
The fix has passed the null local variable test. thanks!
> [javaflow] Uninitialized 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
> Assignee: Torsten Curdt
> Priority: Critical
> Attachments: ContinuationMethodAdapter.java
>
>
> 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
> {
> public void method1()
> {
> Integer result= null;
> if (result != 0)
> result= 1;
> }
> }
> 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:23)
> 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:32)
> 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.
[jira] Commented: (SANDBOX-277) [javaflow] Uninitialized local
variable related bug
Posted by "Torsten Curdt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SANDBOX-277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669901#action_12669901 ]
Torsten Curdt commented on SANDBOX-277:
---------------------------------------
A patch for the test cases would be appreciated.
> [javaflow] Uninitialized 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
> {
> public void method1()
> {
> Integer result= null;
> if (result != 0)
> result= 1;
> }
> }
> 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:23)
> 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:32)
> 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.
[jira] Commented: (SANDBOX-277) [javaflow] Uninitialized local
variable related bug
Posted by "Fernando Petrola (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SANDBOX-277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670731#action_12670731 ]
Fernando Petrola commented on SANDBOX-277:
------------------------------------------
Debugging ContinuationMethodAdapter class I've seen that there are
many lines like this:
mv.visitTypeInsn(CHECKCAST, value.getType().getInternalName());
Those lines are trying to cast the value popped from stack to the
internal value name, but in case of null values there is no type at
least extracted from value.getType(). Is there a way to know the type
of certain local variable at that point?
> [javaflow] Uninitialized 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
> Assignee: Torsten Curdt
> 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
> {
> public void method1()
> {
> Integer result= null;
> if (result != 0)
> result= 1;
> }
> }
> 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:23)
> 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:32)
> 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.
[jira] Updated: (SANDBOX-277) [javaflow] Uninitialized local
variable related bug
Posted by "Fernando Petrola (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SANDBOX-277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fernando Petrola updated SANDBOX-277:
-------------------------------------
Summary: [javaflow] Uninitialized local variable related bug (was: [javaflow] Uninitialize local variable related bug)
> [javaflow] Uninitialized 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.
[jira] Updated: (SANDBOX-277) [javaflow] Uninitialized local
variable related bug
Posted by "Valery Silaev (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SANDBOX-277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Valery Silaev updated SANDBOX-277:
----------------------------------
Attachment: ContinuationMethodAdapter.java
Please update to the latest trunk version, then overwrite ContinuationMethodAdapter with the file attached, rebuild and retest -- the issue should be fixed now.
I've just submitted this attachment to Torsten, so hopefully it should be shortly in SVN.
> [javaflow] Uninitialized 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
> Assignee: Torsten Curdt
> Priority: Critical
> Attachments: ContinuationMethodAdapter.java
>
>
> 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
> {
> public void method1()
> {
> Integer result= null;
> if (result != 0)
> result= 1;
> }
> }
> 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:23)
> 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:32)
> 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.