Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/85#discussion_r114138536
  
    --- Diff: libminifi/src/core/yaml/YamlConfiguration.cpp ---
    @@ -491,14 +510,18 @@ void YamlConfiguration::parsePortYaml(YAML::Node 
*portNode,
     
       YAML::Node inputPortsObj = portNode->as<YAML::Node>();
     
    -  // generate the random UIID
    -  uuid_generate(uuid);
    -
    -  auto portId = inputPortsObj["id"].as<std::string>();
    +  // Check for required fields
    +  checkRequiredField(&inputPortsObj, "name");
       auto nameStr = inputPortsObj["name"].as<std::string>();
    +  checkRequiredField(&inputPortsObj, "id", "The field 'id' is required for 
"
    +      "the port named '" + nameStr + "' in the YAML Config. If this port "
    +      "is specificy an input port for a NiFi Remote Process Group, the 
port "
    +      "id should match the id of of the input port in the NiFi 
configuration. "
    +      "This is a UUID of the format 
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.");
    +  auto portId = inputPortsObj["id"].as<std::string>();
       uuid_parse(portId.c_str(), uuid);
     
    -  port = new minifi::RemoteProcessorGroupPort(nameStr.c_str(), uuid);
    +  port = new minifi::RemoteProcessorGroupPort(nameStr, uuid);
     
       processor = (std::shared_ptr<core::Processor>) port;
    --- End diff --
    
    we should fix this while we're here. we shouldn't cast a raw pointer to a 
shared pointer. That can have unintended consequences. I didn't catch this when 
making changes, apparently. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to