How to avoid null-checks in stages?
The stage has to check for an empty input port.
If the input port is empty, the
AbstractConsumerStage throws a cached
The null-checks are uncomfortable and could be forgotten by the stage developer.
Consider to invoke
execute() only, if at least one input port has an element (for inter-thread scenarios).
Moreover, consider to also pass the input port via
execute() to avoid null-checks.