Alaksiej Ščarbaty created NIFI-16181:
----------------------------------------
Summary: Make MockProcessSession#commitAsync null safe
Key: NIFI-16181
URL: https://issues.apache.org/jira/browse/NIFI-16181
Project: Apache NiFi
Issue Type: Improvement
Components: Core Framework
Affects Versions: 2.11.0
Reporter: Alaksiej Ščarbaty
Assignee: Alaksiej Ščarbaty
_ProcessSession#commitAsync(Runnable, Consumer)_ javadoc allows for nullable
{_}onSuccess{_}, _onFailure_ callbacks. The default implementation of
_commitAsync(Runnable)_ passes null in the _onFailure_ callback.
_MockProcessSession_ implementation doesn't ensure the callbacks are not null,
thus when calling _commitAsync(Runnable)_ with _failCommit_ set, NPE is thrown,
breaking the tests.
{_}StandardProcessSession{_}, for instance, has null checks for both callbacks.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)