You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Alaksiej Ščarbaty (Jira)" <ji...@apache.org> on 2026/08/10 07:41:00 UTC
[jira] [Created] (NIFI-16181) Make MockProcessSession#commitAsync null safe
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)