szaszm commented on a change in pull request #926:
URL: https://github.com/apache/nifi-minifi-cpp/pull/926#discussion_r507814242
##########
File path: libminifi/src/core/ProcessSession.cpp
##########
@@ -66,10 +66,12 @@ ProcessSession::~ProcessSession() {
}
void ProcessSession::add(const std::shared_ptr<core::FlowFile> &record) {
- if (_updatedFlowFiles.find(record->getUUIDStr()) != _updatedFlowFiles.end())
{
+ utils::Identifier uuid;
+ record->getUUID(uuid);
+ if (_updatedFlowFiles.find(uuid) != _updatedFlowFiles.end()) {
Review comment:
if `Nil` is valid:
`getUUID` should return the `Nil` UUID, because it's a valid value, nothing
special about them mandates special treatment. `getUUID` can just `return
uuid_`.
if `Nil` is invalid:
`getUUID` can use `Nil` to represent an invalid value, instead of using
`false`, simplifying the interface. Currently the only invalid value is `Nil`,
so `getUUID` can just `return uuid_`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]