lordgamez commented on code in PR #1360: URL: https://github.com/apache/nifi-minifi-cpp/pull/1360#discussion_r945736178
########## libminifi/src/core/state/nodes/ResponseNodeLoader.cpp: ########## @@ -59,17 +59,17 @@ void ResponseNodeLoader::initializeComponentMetrics(core::ProcessGroup* root) { node_source->getResponseNodes(metric_vector); std::lock_guard<std::mutex> guard(component_metrics_mutex_); for (const auto& metric : metric_vector) { - component_metrics_[metric->getName()] = metric; + component_metrics_[metric->getName()].push_back(metric); } } } -std::shared_ptr<ResponseNode> ResponseNodeLoader::getResponseNode(const std::string& clazz) const { +std::vector<std::shared_ptr<ResponseNode>> ResponseNodeLoader::getResponseNodes(const std::string& clazz) const { std::shared_ptr<core::CoreComponent> ptr = core::ClassLoader::getDefaultClassLoader().instantiate(clazz, clazz); if (ptr == nullptr) { - return getComponentMetricsNode(clazz); + return getComponentMetricsNodes(clazz); } - return std::dynamic_pointer_cast<ResponseNode>(ptr); + return {std::dynamic_pointer_cast<ResponseNode>(ptr)}; Review Comment: Added a `gsl_Expects` for this in 567764bbdc4bac04b07b50337293ae732fd8580d -- 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