aminadinari19 commented on a change in pull request #1040: URL: https://github.com/apache/nifi-minifi-cpp/pull/1040#discussion_r612988788
########## File path: extensions/mqtt/processors/PublishMQTT.cpp ########## @@ -64,7 +64,9 @@ void PublishMQTT::onSchedule(const std::shared_ptr<core::ProcessContext> &contex logger_->log_debug("PublishMQTT: max flow segment size [%" PRIu64 "]", max_seg_size_); } value = ""; - if (context->getProperty(Retain.getName(), value) && !value.empty() && org::apache::nifi::minifi::utils::StringUtils::StringToBool(value, retain_)) { + utils::optional<bool> retain_parsed; + if (context->getProperty(Retain.getName(), value) && (retain_parsed = org::apache::nifi::minifi::utils::StringUtils::toBool(value))) { + retain_ = retain_parsed.value(); Review comment: Fixed :) -- 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