[
https://issues.apache.org/jira/browse/NIFI-16181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Handermann updated NIFI-16181:
------------------------------------
Summary: Adjust MockProcessSession#commitAsync to allow null callbacks
(was: Make MockProcessSession#commitAsync null safe)
> Adjust MockProcessSession#commitAsync to allow null callbacks
> -------------------------------------------------------------
>
> 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
> Priority: Minor
> Fix For: 2.12.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> _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)