adamdebreceni commented on a change in pull request #797:
URL: https://github.com/apache/nifi-minifi-cpp/pull/797#discussion_r431210652
##########
File path: libminifi/src/core/ConfigurableComponent.cpp
##########
@@ -103,11 +105,12 @@ bool ConfigurableComponent::updateProperty(const
std::string &name, const std::s
if (it != properties_.end()) {
Property orig_property = it->second;
- Property new_property = orig_property;
+ Property& new_property = it->second;
+ utils::ScopeGuard onExit([&] {
Review comment:
if `addValue` throws this still notifies the component of the changed
property, as we do not have `finally` in c++ it is cleaner than calling it both
in a catch and outside
----------------------------------------------------------------
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]