fgerlits commented on a change in pull request #1040: URL: https://github.com/apache/nifi-minifi-cpp/pull/1040#discussion_r605683126
########## File path: extensions/mqtt/processors/AbstractMQTTProcessor.cpp ########## @@ -85,8 +86,9 @@ void AbstractMQTTProcessor::onSchedule(const std::shared_ptr<core::ProcessContex logger_->log_debug("AbstractMQTTProcessor: PassWord [%s]", passWord_); } value = ""; - if (context->getProperty(CleanSession.getName(), value) && !value.empty() && - org::apache::nifi::minifi::utils::StringUtils::StringToBool(value, cleanSession_)) { + utils::optional<bool> cleanSession_parsed; + if (context->getProperty(CleanSession.getName(), value) && (cleanSession_parsed = org::apache::nifi::minifi::utils::StringUtils::toBool(value))) { + cleanSession_ = cleanSession_parsed.value(); Review comment: the `if (... && cleanSession_parsed)` ensures that `cleanSession_parsed` is not empty -- 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: us...@infra.apache.org