[ 
https://issues.apache.org/jira/browse/NIFI-16181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18103397#comment-18103397
 ] 

ASF subversion and git services commented on NIFI-16181:
--------------------------------------------------------

Commit 96737bbd588dd6fea2b6624c9cffae55557fce72 in nifi's branch 
refs/heads/main from Alaksiej Ščarbaty
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=96737bbd588 ]

NIFI-16181 Adjust MockProcessSession.commitAsync() to allow null callbacks 
#11524)

Signed-off-by: David Handermann <[email protected]>

> 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
>            Priority: Minor
>          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)

Reply via email to