Bug fix. InMemoryTable handler is null
@@ -45,6 +45,7 @@ import org.wso2.siddhi.core.stream.output.sink.Sink;
import org.wso2.siddhi.core.stream.output.sink.SinkCallback;
import org.wso2.siddhi.core.stream.output.sink.SinkHandlerManager;
import org.wso2.siddhi.core.table.Table;
+import org.wso2.siddhi.core.table.record.RecordTableHandler;
import org.wso2.siddhi.core.table.record.RecordTableHandlerManager;
import org.wso2.siddhi.core.util.ExceptionUtil;
import org.wso2.siddhi.core.util.SiddhiConstants;
@@ -352,7 +353,11 @@ public class SiddhiAppRuntime {
RecordTableHandlerManager recordTableHandlerManager = siddhiAppContext.getSiddhiContext().
getRecordTableHandlerManager();
if (recordTableHandlerManager != null) {
- String elementId = table.getHandler().getElementId();
+ String elementId = null;
+ RecordTableHandler recordTableHandler = table.getHandler();
+ if (recordTableHandler != null) {
+ elementId = recordTableHandler.getElementId();
+ }
if (elementId != null) {
recordTableHandlerManager.unregisterRecordTableHandler(elementId);
}
