bakaid commented on a change in pull request #605:
URL: https://github.com/apache/nifi-minifi-cpp/pull/605#discussion_r413742717
##########
File path: libminifi/src/core/ConfigurableComponent.cpp
##########
@@ -195,6 +195,19 @@ bool
ConfigurableComponent::setSupportedProperties(std::set<Property> properties
return true;
}
+bool ConfigurableComponent::updateSupportedProperties(std::set<Property>
properties) {
+ if (!canEdit()) {
+ return false;
+ }
+
+ std::lock_guard<std::mutex> lock(configuration_mutex_);
+
+ for (auto item : properties) {
+ properties_[item.getName()] = item;
Review comment:
This function is a modified version of
`ConfigurableComponent::setSupportedProperties`. Yes, the copies can be avoided
both here and there, but it is completely inconsequential, as this happens only
once per flow initialization.
----------------------------------------------------------------
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]