fgerlits commented on a change in pull request #937:
URL: https://github.com/apache/nifi-minifi-cpp/pull/937#discussion_r526284846
##########
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:
`IsNullOrEmpty` could make sense eg. for a `shared_ptr<string>`, but
yes, I would remove it in the case where it simply tests whether the argument
is null, including `configuration_` -- but not in the is pull request.
In this PR, I would leave `IsNullOrEmpty` calls as they are for now, but
wouldn't add new ones.
----------------------------------------------------------------
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]