You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2022/02/07 01:23:15 UTC
[activemq-artemis] branch main updated: ARTEMIS-3670 Fixing Divert Update tests
This is an automated email from the ASF dual-hosted git repository.
jbertram pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/main by this push:
new 100e4ab ARTEMIS-3670 Fixing Divert Update tests
new 3205c4f This closes #3943
100e4ab is described below
commit 100e4abd7b4f127a246aaed7657d95596b65c739
Author: Clebert Suconic <cl...@apache.org>
AuthorDate: Sun Feb 6 11:42:03 2022 -0500
ARTEMIS-3670 Fixing Divert Update tests
---
.../activemq/artemis/core/server/impl/DivertImpl.java | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/DivertImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/DivertImpl.java
index df624b0..12cbeb9 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/DivertImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/DivertImpl.java
@@ -41,7 +41,7 @@ public class DivertImpl implements Divert {
private volatile SimpleString forwardAddress;
- private final SimpleString[] forwardAddresses;
+ private volatile SimpleString[] forwardAddresses;
private final SimpleString uniqueName;
@@ -69,13 +69,7 @@ public class DivertImpl implements Divert {
final ComponentConfigurationRoutingType routingType) {
this.address = address;
- this.forwardAddress = forwardAddress;
-
- String[] split = forwardAddress.toString().split(",");
- forwardAddresses = new SimpleString[split.length];
- for (int i = 0; i < split.length; i++) {
- forwardAddresses[i] = new SimpleString(split[i].trim());
- }
+ this.setForwardAddress(forwardAddress);
this.uniqueName = uniqueName;
@@ -206,6 +200,14 @@ public class DivertImpl implements Divert {
@Override
public void setForwardAddress(SimpleString forwardAddress) {
this.forwardAddress = forwardAddress;
+
+ String[] split = forwardAddress.toString().split(",");
+ SimpleString[] forwardAddresses = new SimpleString[split.length];
+ for (int i = 0; i < split.length; i++) {
+ forwardAddresses[i] = new SimpleString(split[i].trim());
+ }
+
+ this.forwardAddresses = forwardAddresses;
}
@Override