martinzink commented on code in PR #2063:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2063#discussion_r2527229119


##########
core-framework/include/core/VariableRegistry.h:
##########
@@ -40,53 +44,37 @@ class VariableRegistryImpl : public virtual 
VariableRegistry {
 
   ~VariableRegistryImpl() override = default;
 
-  bool getConfigurationProperty(const std::string &property, std::string 
&value) const override {
-    auto prop = variable_registry_.find(property);
-    if (prop != variable_registry_.end()) {
-      value = prop->second;
-      return true;
+  [[nodiscard]] std::optional<std::string> getConfigurationProperty(const 
std::string_view key) const override {
+    const auto it = variable_registry_.find(key);
+    if (it == variable_registry_.end()) {
+      return std::nullopt;
     }
-    return false;
+    return it->second;
   }
 
  protected:
   void loadVariableRegistry() {
-    std::string registry_values;
-
-    auto options = configuration_->getConfiguredKeys();
-    std::string white_list_opt = "minifi.variable.registry.whitelist", 
white_list;
-    std::string black_list_opt = "minifi.variable.registry.blacklist", 
black_list;
+    gsl_Assert(configuration_);
+    auto options = configuration_->get("minifi.variable.registry.whitelist")

Review Comment:
   👍 good idea, [add minifi_variable_registry_whitelist and 
minifi_variable_registry_b…](https://github.com/apache/nifi-minifi-cpp/pull/2063/commits/d2ef0b0a71a23f2f85a70281ebf038f092e4a832)



-- 
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]

Reply via email to