bakaid commented on a change in pull request #586: MINIFICPP-911 - Added
ListSFTP and FetchSFTP processors
URL: https://github.com/apache/nifi-minifi-cpp/pull/586#discussion_r291571973
##########
File path: libminifi/src/core/ConfigurableComponent.cpp
##########
@@ -70,7 +70,7 @@ bool ConfigurableComponent::setProperty(const std::string
name, std::string valu
auto &&it = properties_.find(name);
if (it != properties_.end()) {
- Property &orig_property = it->second;
Review comment:
Yes. The problem is that the orig_property becomes the new_property before
onPropertyModified is called, and you both properties you get in
onPropertyModified is actually the new one. (We take a reference to a value in
the map, copy that value, modify it, and then insert it back into the map with
the same key, making the reference point to the new value.)
There was a version of the cache invalidation logic that worked by
overriding the onPropertyModified function in the ListSFTP class. I found no
other processor that actually did that. Later I realized that it is not
sufficient for me (I want to check whether a property changed after processing
the EL and further parsing), so I moved the whole thing, but I did not want to
leave as it is for the next guy.
----------------------------------------------------------------
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]
With regards,
Apache Git Services