adamdebreceni commented on a change in pull request #1032:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1032#discussion_r600363533
##########
File path: libminifi/include/core/state/nodes/AgentInformation.h
##########
@@ -425,77 +427,121 @@ class AgentStatus : public StateMonitorNode {
std::vector<SerializedResponseNode> serialize() {
std::vector<SerializedResponseNode> serialized;
+ if (!repositories_.empty()) {
+ serialized.push_back(serializeRepositories());
Review comment:
after the refactor we should only depend on the return value of
`serializeRepositories()` to determine if we should append it to the
`serialized` vector, I propose either
1. an `SerializedResponseNode::empty` member function
2. or `serializeRepositories()` returning an `optional<...>`
my preference lies with 1) az I wouldn't consider serializing an empty list
of repositories "invalid" per-se
(this applies to `serializeComponents` as well)
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]