This is an automated email from the ASF dual-hosted git repository. lordgamez pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 50b943940633880b6cb60ffea377982b1a60b71a Author: Martin Zink <[email protected]> AuthorDate: Fri Aug 22 10:35:23 2025 +0200 MINIFICPP-2610 Fixing false positive warnings with ControllerServices Co-authored-by: Copilot <[email protected]> Signed-off-by: Gabor Gyimesi <[email protected]> This closes #2011 --- libminifi/src/core/flow/StructuredConfiguration.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libminifi/src/core/flow/StructuredConfiguration.cpp b/libminifi/src/core/flow/StructuredConfiguration.cpp index 112f92ff4..82b045196 100644 --- a/libminifi/src/core/flow/StructuredConfiguration.cpp +++ b/libminifi/src/core/flow/StructuredConfiguration.cpp @@ -922,7 +922,15 @@ void StructuredConfiguration::parsePropertiesNode(const Node& properties_node, c for (const auto& property_node : properties_node) { const auto propertyName = property_node.first.getString().value(); const Node propertyValueNode = property_node.second; - parsePropertyNodeElement(propertyName, propertyValueNode, component, parameter_context); + const bool is_controller_service_node = dynamic_cast<core::controller::ControllerServiceNode*>(&component) != nullptr; + const bool is_linked_services = propertyName == "Linked Services"; + // We currently propagate properties to the ControllerServiceNode wrapper and to the actual ControllerService. + // This could cause false positive warnings because the Node should only handle the linked services while implementation should contain everything else + // We should probably remove the nodes and handle the linked services concept inside the impls + // Only parse the property if both are true or both are false (i.e., not mixing controller service node and linked services) + if ((is_controller_service_node && is_linked_services) || (!is_controller_service_node && !is_linked_services)) { + parsePropertyNodeElement(propertyName, propertyValueNode, component, parameter_context); + } } validateComponentProperties(component, component_name, properties_node.getPath());
