From 2d16ec3305e409cbbfb57a6f21cede3d6dba76ba Mon Sep 17 00:00:00 2001 From: Justin Bertram Date: Mon, 28 Feb 2022 10:12:05 -0600 Subject: [PATCH] ARTEMIS-3685 fix a couple more issues --- .../core/server/cluster/impl/ClusterConnectionBridge.java | 3 ++- .../artemis/core/server/impl/ServiceRegistryImpl.java | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionBridge.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionBridge.java index 1d058978f0..4dfe754d9b 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionBridge.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionBridge.java @@ -122,6 +122,7 @@ public class ClusterConnectionBridge extends BridgeImpl { final String storeAndForwardPrefix, final StorageManager storageManager) throws ActiveMQException { super(targetLocator, new BridgeConfiguration() + .setName(name == null ? null : name.toString()) .setInitialConnectAttempts(initialConnectAttempts) .setReconnectAttempts(reconnectAttempts) .setReconnectAttemptsOnSameNode(0) // reconnectAttemptsOnSameNode means nothing on the clustering bridge since we always try the same @@ -129,7 +130,7 @@ public class ClusterConnectionBridge extends BridgeImpl { .setRetryIntervalMultiplier(retryMultiplier) .setMaxRetryInterval(maxRetryInterval) .setFilterString(filterString == null ? null : filterString.toString()) - .setForwardingAddress(forwardingAddress.toString()) + .setForwardingAddress(forwardingAddress == null ? null : forwardingAddress.toString()) .setUseDuplicateDetection(useDuplicateDetection) .setUser(user) .setPassword(password) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServiceRegistryImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServiceRegistryImpl.java index 1597e08061..9581bec992 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServiceRegistryImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServiceRegistryImpl.java @@ -191,6 +191,10 @@ public class ServiceRegistryImpl implements ServiceRegistry { @Override public Transformer getBridgeTransformer(String name, TransformerConfiguration transformerConfiguration) { + if (transformerConfiguration == null) { + return null; + } + Transformer transformer = bridgeTransformers.get(name); if (transformer == null && transformerConfiguration != null && transformerConfiguration.getClassName() != null) {