Check if javaInstance is created in the first place before invocing close
@@ -348,7 +348,9 @@ public class JavaInstanceRunnable implements AutoCloseable, Runnable {
@Override
public void close() {
processor.close();
+ if (null != javaInstance) {
javaInstance.close();
+ }
// kill the state table
if (null != stateTable) {
