SpencerPark / IJava

A Jupyter kernel for executing Java code.
MIT License
1.1k stars 217 forks source link

Simple variable declaration raises java.lang.IllegalStateException #26

Closed marlohaering closed 6 years ago

marlohaering commented 6 years ago

When I declare a variable like:

int number;

The following exceptionsexception is thrown:

java.lang.IllegalStateException: No result with key: 0
at io.github.spencerpark.ijava.execution.IJavaExecutionControl.takeResult(IJavaExecutionControl.java:80)
at io.github.spencerpark.ijava.execution.CodeEvaluator.evalSingle(CodeEvaluator.java:78)
at io.github.spencerpark.ijava.execution.CodeEvaluator.eval(CodeEvaluator.java:122)
at io.github.spencerpark.ijava.JavaKernel.evalRaw(JavaKernel.java:251)
at io.github.spencerpark.ijava.JavaKernel.eval(JavaKernel.java:256)
at io.github.spencerpark.jupyter.kernel.BaseKernel.handleExecuteRequest(BaseKernel.java:307)
at io.github.spencerpark.jupyter.channels.ShellChannel.lambda$bind$16(ShellChannel.java:54)
at java.base/java.lang.Thread.run(Thread.java:844)
at io.github.spencerpark.jupyter.channels.Loop.run(Loop.java:44)

Why?

marlohaering commented 6 years ago

Probably a duplicate of #24

SpencerPark commented 6 years ago

Indeed a duplicate of #24 and fixed in 32974b3f39c4971aad062b872b0e75e076113d7c. There is one more bug I would like to take another look at before releasing the fix in v1.1.2.