From 4473758edb400e1f815e13c33431d189e39610df Mon Sep 17 00:00:00 2001 From: Domenico Francesco Bruscino Date: Mon, 22 Mar 2021 09:06:04 +0100 Subject: [PATCH] ARTEMIS-3195 Filter empty items from listNetworkTopology --- .../core/management/impl/ActiveMQServerControlImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java index b1783a634d..67f9281b77 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java @@ -4043,16 +4043,16 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active Collection members = topology.getMembers(); for (TopologyMemberImpl member : members) { - JsonObjectBuilder obj = JsonLoader.createObjectBuilder(); TransportConfiguration live = member.getLive(); if (live != null) { + JsonObjectBuilder obj = JsonLoader.createObjectBuilder(); obj.add("nodeID", member.getNodeId()).add("live", live.getParams().get("host") + ":" + live.getParams().get("port")); TransportConfiguration backup = member.getBackup(); if (backup != null) { obj.add("backup", backup.getParams().get("host") + ":" + backup.getParams().get("port")); } + brokers.add(obj); } - brokers.add(obj); } } }