adamdebreceni commented on code in PR #1391:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1391#discussion_r1003037571


##########
libminifi/src/core/flow/StructuredConnectionParser.cpp:
##########
@@ -46,18 +46,18 @@ void 
YamlConnectionParser::addFunnelRelationshipToConnection(minifi::Connection&
   }
 }
 
-void 
YamlConnectionParser::configureConnectionSourceRelationshipsFromYaml(minifi::Connection&
 connection) const {
+void 
StructuredConnectionParser::configureConnectionSourceRelationships(minifi::Connection&
 connection) const {
   // Configure connection source
-  if (connectionNode_.as<YAML::Node>()["source relationship name"] && 
!connectionNode_["source relationship name"].as<std::string>().empty()) {
-    addNewRelationshipToConnection(connectionNode_["source relationship 
name"].as<std::string>(), connection);
-  } else if (connectionNode_.as<YAML::Node>()["source relationship names"]) {
+  if (connectionNode_["source relationship name"] && !connectionNode_["source 
relationship name"].getString().value().empty()) {
+    addNewRelationshipToConnection(connectionNode_["source relationship 
name"].getString().value(), connection);
+  } else if (connectionNode_["source relationship names"]) {
     auto relList = connectionNode_["source relationship names"];

Review Comment:
   as I mentioned in another comment (which I cannot find), I am not a fan of 
lifetime extensions (since `flow::Node` is just a proxy we return by value), 
but as part2, I would like to do some cleanup in this files, there we could 
rewrite all such accesses if we decide so



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to