hunyadi-dev commented on a change in pull request #1040:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1040#discussion_r607787916
##########
File path: libminifi/src/c2/ControllerSocketProtocol.cpp
##########
@@ -51,18 +49,13 @@ void
ControllerSocketProtocol::initialize(core::controller::ControllerServicePro
}
if (nullptr == secure_context) {
std::string secureStr;
- bool is_secure = false;
- if (configuration->get(Configure::nifi_remote_input_secure, secureStr) &&
org::apache::nifi::minifi::utils::StringUtils::StringToBool(secureStr,
is_secure)) {
+ if (configuration->get(Configure::nifi_remote_input_secure, secureStr) &&
org::apache::nifi::minifi::utils::StringUtils::toBool(secureStr).value_or(false))
{
secure_context =
std::make_shared<minifi::controllers::SSLContextService>("ControllerSocketProtocolSSL",
configuration);
secure_context->onEnable();
}
}
- std::string value;
-
- if (configuration_->get("controller.socket.local.any.interface", limitStr)) {
- utils::StringUtils::StringToBool(limitStr, anyInterface);
- }
+ const bool anyInterface
=(configuration_->get("controller.socket.local.any.interface", limitStr) &&
utils::StringUtils::toBool(limitStr).value_or(false));
Review comment:
That also decreases the chance of depression as it eliminates a sad
smile.
--
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]