martinzink commented on code in PR #1543:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1543#discussion_r1151517332
##########
libminifi/src/properties/Properties.cpp:
##########
@@ -87,13 +128,17 @@ void Properties::loadConfigureFile(const
std::filesystem::path& configuration_fi
return;
}
properties_.clear();
+ dirty_ = false;
for (const auto& line : PropertiesFile{file}) {
+ auto key = line.getKey();
auto persisted_value = line.getValue();
auto value =
utils::StringUtils::replaceEnvironmentVariables(persisted_value);
- properties_[line.getKey()] = {persisted_value, value, false};
+ bool need_to_persist_new_value = false;
+ formatConfigurationProperty(key, persisted_value, value,
need_to_persist_new_value);
+ dirty_ |= need_to_persist_new_value;
Review Comment:
sure, it will be more readable changed it in
https://github.com/apache/nifi-minifi-cpp/pull/1543/commits/ee61abd3c1c0efc9f2d460bd691f854f26e9a5aa#diff-f841426e292e70012a81b0fae92f08df7b13120e17b17a92fc360f2f50ec072fR190
--
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]