NIFI-11177: Add defensive code for null values for Iceberg#7777
NIFI-11177: Add defensive code for null values for Iceberg#7777mattyb149 wants to merge 1 commit intoapache:mainfrom
Conversation
mark-bathori
left a comment
There was a problem hiding this comment.
Thanks @mattyb149 for fixing this null handling issue. Since every converter needs a null check in the convert(Object data) method I think it would be a better solution to add this null check in a new method in the DataConverter<S, T> abstract class and then this would call to the convert method. With this change we don't need to add the same null check to every implementation.
|
This should work since the top-level |
mark-bathori
left a comment
There was a problem hiding this comment.
It shouldn't be called from other places but of course it could happen. I'm fine with the current solution also.
LGTM +1
|
I'll push a commit with the new method and change the complex types to call that, just for safety :) |
43a4834 to
5125fd3
Compare
|
I think the last commit is not needed since the original solution contains null check in every |
5125fd3 to
37743f6
Compare
Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com> This closes #7777.
Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com> This closes apache#7777.
Summary
NIFI-11177 This PR adds defensive checks to return null values when any conversions occur
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000NIFI-00000Pull Request Formatting
mainbranchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
mvn clean install -P contrib-checkLicensing
LICENSEandNOTICEfilesDocumentation