adamdebreceni commented on a change in pull request #937:
URL: https://github.com/apache/nifi-minifi-cpp/pull/937#discussion_r526033553
##########
File path: libminifi/src/FlowController.cpp
##########
@@ -70,60 +71,33 @@ namespace apache {
namespace nifi {
namespace minifi {
-#define DEFAULT_CONFIG_NAME "conf/config.yml"
-
-FlowController::FlowController(std::shared_ptr<core::Repository>
provenance_repo, std::shared_ptr<core::Repository> flow_file_repo,
std::shared_ptr<Configure> configure,
- std::unique_ptr<core::FlowConfiguration>
flow_configuration, std::shared_ptr<core::ContentRepository> content_repo,
const std::string name, bool headless_mode)
+FlowController::FlowController(std::shared_ptr<core::Repository>
provenance_repo, std::shared_ptr<core::Repository> flow_file_repo,
+ std::shared_ptr<Configure> configure,
std::unique_ptr<core::FlowConfiguration> flow_configuration,
+ std::shared_ptr<core::ContentRepository>
content_repo, const std::string name, bool headless_mode,
+ std::shared_ptr<utils::file::FileSystem>
filesystem)
:
core::controller::ControllerServiceProvider(core::getClassName<FlowController>()),
- root_(nullptr),
+ c2::C2Client(std::move(configure), std::move(provenance_repo),
std::move(flow_file_repo),
+ std::move(content_repo), std::move(flow_configuration),
std::move(filesystem)),
running_(false),
updating_(false),
- c2_enabled_(true),
initialized_(false),
- provenance_repo_(provenance_repo),
- flow_file_repo_(flow_file_repo),
controller_service_map_(std::make_shared<core::controller::ControllerServiceMap>()),
thread_pool_(2, false, nullptr, "Flowcontroller threadpool"),
- flow_configuration_(std::move(flow_configuration)),
- configuration_(std::move(configure)),
- content_repo_(content_repo),
logger_(logging::LoggerFactory<FlowController>::getLogger()) {
- if (provenance_repo == nullptr)
+ if (IsNullOrEmpty(provenance_repo_))
Review comment:
the whole existence of `IsNullOrEmpty` is questionable to me, but its
usage is ubiquitous, and since it was already used for `configuration_` I
rewrote the others as well, I am not against getting rid of it, do you think we
should do it, either only here, or in other places as well?
----------------------------------------------------------------
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]