adam-markovics commented on code in PR #1328: URL: https://github.com/apache/nifi-minifi-cpp/pull/1328#discussion_r924508317
########## controller/Controller.h: ########## @@ -246,15 +247,25 @@ std::shared_ptr<org::apache::nifi::minifi::core::controller::ControllerService> configuration->get(org::apache::nifi::minifi::Configure::nifi_provenance_repository_class_name, prov_repo_class); // Create repos for flow record and provenance - const std::shared_ptr prov_repo = org::apache::nifi::minifi::core::createRepository(prov_repo_class, true, "provenance"); + const std::shared_ptr prov_repo_base = org::apache::nifi::minifi::core::createRepository(prov_repo_class, + "provenance"); + const auto prov_repo = std::dynamic_pointer_cast<org::apache::nifi::minifi::core::Repository>(prov_repo_base); + if (!prov_repo) { + throw org::apache::nifi::minifi::Exception(org::apache::nifi::minifi::REPOSITORY_EXCEPTION, "Could not create provenance repository"); + } prov_repo->initialize(configuration); configuration->get(org::apache::nifi::minifi::Configure::nifi_flow_repository_class_name, flow_repo_class); - const std::shared_ptr flow_repo = org::apache::nifi::minifi::core::createRepository(flow_repo_class, true, "flowfile"); + const std::shared_ptr flow_repo_base = org::apache::nifi::minifi::core::createRepository(flow_repo_class, "flowfile"); + const auto flow_repo = std::dynamic_pointer_cast<org::apache::nifi::minifi::core::Repository>(flow_repo_base); Review Comment: Done. -- 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. To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org