This is an automated email from the ASF dual-hosted git repository. adebreceni pushed a commit to branch minifi-api-reduced in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 4438275708e399067507814e442c2a8041c2a5ae Author: Adam Debreceni <[email protected]> AuthorDate: Thu Jul 17 15:17:21 2025 +0200 Review changes --- core-framework/include/core/ProcessorImpl.h | 7 ++----- extensions/python/PythonObjectFactory.h | 2 +- libminifi/src/core/flow/StructuredConnectionParser.cpp | 2 +- libminifi/test/libtest/unit/TestBase.h | 1 + libminifi/test/libtest/unit/TestUtils.h | 5 +++-- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/core-framework/include/core/ProcessorImpl.h b/core-framework/include/core/ProcessorImpl.h index 987bb7586..fc6fc8a80 100644 --- a/core-framework/include/core/ProcessorImpl.h +++ b/core-framework/include/core/ProcessorImpl.h @@ -17,18 +17,15 @@ #pragma once #include <algorithm> +#include <array> #include <atomic> #include <chrono> #include <condition_variable> #include <functional> #include <memory> #include <mutex> +#include <span> #include <string> -#include <string_view> -#include <unordered_set> -#include <unordered_map> -#include <utility> -#include <vector> #include "core/ConfigurableComponentImpl.h" #include "core/Connectable.h" diff --git a/extensions/python/PythonObjectFactory.h b/extensions/python/PythonObjectFactory.h index 577f53f9a..8073dc6af 100644 --- a/extensions/python/PythonObjectFactory.h +++ b/extensions/python/PythonObjectFactory.h @@ -27,7 +27,7 @@ #include "core/ClassLoader.h" #include "ExecutePythonProcessor.h" #include "utils/StringUtils.h" -#include "core/ProcessorFactory.h" +#include "core/ProcessorFactoryImpl.h" enum class PythonProcessorType { MINIFI_TYPE, diff --git a/libminifi/src/core/flow/StructuredConnectionParser.cpp b/libminifi/src/core/flow/StructuredConnectionParser.cpp index 728bc95f6..4867e54df 100644 --- a/libminifi/src/core/flow/StructuredConnectionParser.cpp +++ b/libminifi/src/core/flow/StructuredConnectionParser.cpp @@ -41,7 +41,7 @@ void StructuredConnectionParser::addFunnelRelationshipToConnection(minifi::Conne return; } - if (dynamic_cast<minifi::Funnel*>(&processor->getImpl())) { + if (typeid(minifi::Funnel) == typeid(processor->getImpl())) { addNewRelationshipToConnection(minifi::Funnel::Success.name, connection); } } diff --git a/libminifi/test/libtest/unit/TestBase.h b/libminifi/test/libtest/unit/TestBase.h index 8ecef5ab6..39b2856af 100644 --- a/libminifi/test/libtest/unit/TestBase.h +++ b/libminifi/test/libtest/unit/TestBase.h @@ -205,6 +205,7 @@ template<typename T> class TypedProcessorWrapper { public: TypedProcessorWrapper() = default; + // it's a wrapper over the same object, with no value change TypedProcessorWrapper(core::Processor* proc): proc_(proc) { // NOLINT(runtime/explicit) if (proc_) { proc_->getImpl<T>(); diff --git a/libminifi/test/libtest/unit/TestUtils.h b/libminifi/test/libtest/unit/TestUtils.h index 83e9bce23..13d7b7d24 100644 --- a/libminifi/test/libtest/unit/TestUtils.h +++ b/libminifi/test/libtest/unit/TestUtils.h @@ -213,10 +213,11 @@ inline std::error_code hide_file(const std::filesystem::path& file_name) { #endif /* WIN32 */ template<typename T> -concept NetworkingProcessor = requires(T x) { +concept NetworkingProcessor = std::derived_from<T, minifi::core::ProcessorApi> + && requires(T x) { {T::Port} -> std::convertible_to<core::PropertyReference>; {x.getPort()} -> std::convertible_to<uint16_t>; -}; // NOLINT(readability/braces) + }; // NOLINT(readability/braces) template<NetworkingProcessor T> uint16_t scheduleProcessorOnRandomPort(const std::shared_ptr<TestPlan>& test_plan, const TypedProcessorWrapper<T>& processor) {
