martinzink commented on code in PR #1543: URL: https://github.com/apache/nifi-minifi-cpp/pull/1543#discussion_r1155850024
########## libminifi/src/properties/Properties.cpp: ########## @@ -62,8 +63,100 @@ int Properties::getInt(const std::string &key, int default_value) const { return it != properties_.end() ? std::stoi(it->second.active_value) : default_value; } +namespace { +const core::PropertyValidator* getValidator(const std::string& lookup_value) { + auto configuration_property = Configuration::CONFIGURATION_PROPERTIES.find(lookup_value); + + if (configuration_property != Configuration::CONFIGURATION_PROPERTIES.end()) + return configuration_property->second; + return nullptr; +} + +std::optional<std::string> ensureTimePeriodValidatedPropertyHasExplicitUnit(const core::PropertyValidator* const validator, std::string& value) { + if (validator != core::StandardValidators::get().TIME_PERIOD_VALIDATOR.get()) + return std::nullopt; + if (value.empty() || !std::all_of(value.begin(), value.end(), ::isdigit)) Review Comment: nice catch, fixed it in https://github.com/apache/nifi-minifi-cpp/pull/1543/commits/64c5975e3fda0911820465778fa4d73f16d12002#diff-f841426e292e70012a81b0fae92f08df7b13120e17b17a92fc360f2f50ec072fR78 -- 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: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org