diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/UDPBroadcastEndpointFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/UDPBroadcastEndpointFactory.java index 4f100e322d..dff18a5ff7 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/UDPBroadcastEndpointFactory.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/UDPBroadcastEndpointFactory.java @@ -179,8 +179,6 @@ public final class UDPBroadcastEndpointFactory implements BroadcastEndpointFacto } else { if (localAddress != null) { - java.util.Random random = new java.util.Random(System.currentTimeMillis()); - for (int i = 0; i < 100; i++) { int nextPort = RandomUtil.randomInterval(3000, 4000); try { diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AddressControlImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AddressControlImpl.java index bf01fbb27e..7dbe750e15 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AddressControlImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AddressControlImpl.java @@ -180,7 +180,6 @@ public class AddressControlImpl extends AbstractControl implements AddressContro long totalMsgs = 0; try { Bindings bindings = postOffice.getBindingsForAddress(address); - List queueNames = new ArrayList<>(); for (Binding binding : bindings.getBindings()) { if (binding instanceof QueueBinding) { totalMsgs += ((QueueBinding) binding).getQueue().getMessageCount();