fgerlits commented on code in PR #2016:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2016#discussion_r2378951626


##########
extensions/azure/controllerservices/AzureStorageCredentialsService.cpp:
##########
@@ -29,6 +29,10 @@ void AzureStorageCredentialsService::initialize() {
 }
 
 void AzureStorageCredentialsService::onEnable() {
+  auto credential_configuration_strategy_str = 
getProperty(CredentialConfigurationStrategy.name).value_or(std::string{magic_enum::enum_name(CredentialConfigurationStrategyOption::FromProperties)});
+  if (auto credential_configuration_strategy = 
magic_enum::enum_cast<CredentialConfigurationStrategyOption>(credential_configuration_strategy_str))
 {
+    
credentials_.setCredentialConfigurationStrategy(*credential_configuration_strategy);
+  }

Review Comment:
   I would put an `else` branch here, and either throw or at least log an 
error: the user has set an invalid value.



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