Skip to content

Commit

Permalink
ARTEMIS-3670 Fixing Divert Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
clebertsuconic committed Feb 6, 2022
1 parent fac9837 commit 100e4ab
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -69,13 +69,7 @@ public DivertImpl(final SimpleString uniqueName,
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;

Expand Down Expand Up @@ -206,6 +200,14 @@ public void setTransformer(Transformer transformer) {
@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
Expand Down

0 comments on commit 100e4ab

Please sign in to comment.