siddhi-io / siddhi-execution-time

Extension that provides time-related functionalities
https://siddhi-io.github.io/siddhi-execution-time
Apache License 2.0
3 stars 30 forks source link

Fix https://github.com/siddhi-io/siddhi-execution-time/issues/58 #59

Closed dilini-muthumala closed 4 years ago

dilini-muthumala commented 4 years ago

Purpose

Fix https://github.com/siddhi-io/siddhi-execution-time/issues/58

Goals

Avoid unnecessory error logs in the console.

Approach

When the RESET event goes through the execute() method, some of the elements in the data array could be null. When this happens, the execute() method should return null; rather than throwing a SiddhiAppRuntimeException. When the execute() method returns null, Siddhi properly handles it. This is the same behaviour that is there in the expression executors in the Siddhi core (For example, refer AddExpressionExecutorInt class in Siddhi core).

Documentation

N/A as this is a bug fix.

Certification

N/A as this is a bug fix.

Automation tests

Security checks

Migrations (if applicable)

The functions listed under this extension will now return null, when a null input is given.

Test environment

Mac OS 10.13.1 (17B1003) java version "1.8.0_171" Java(TM) SE Runtime Environment (build 1.8.0_171-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)