fgerlits commented on code in PR #2227:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2227#discussion_r3721958023
##########
extensions/python/PythonCreator.h:
##########
@@ -174,7 +175,8 @@ class PythonCreator : public
minifi::core::CoreComponentImpl {
.inputRequirement_ = toString(processor->getInputRequirement()),
.isSingleThreaded_ = processor->isSingleThreaded()};
-
minifi::ClassDescriptionRegistry::getMutableClassDescriptions()[details].processors.push_back(description);
+ auto& bundle_components =
minifi::ClassDescriptionRegistry::getMutableClassDescriptions().try_emplace(details,
details).first->second;
+ bundle_components.addClassDescription(description,
ResourceType::Processor);
Review Comment:
This `try_emplace(details, details).first->second` looks a bit confusing,
and it is repeated several times. Can we add a helper function so that we can
write something like
```suggestion
auto& bundle_components =
minifi::ClassDescriptionRegistry::getMutableComponents(bundle_identifier);
bundle_components.addClassDescription(description,
ResourceType::Processor);
```
instead?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]