This closes #1240
This commit is contained in:
commit
c1df97de66
|
@ -232,7 +232,7 @@ public class SimpleAddressManager implements AddressManager {
|
||||||
@Override
|
@Override
|
||||||
public AddressInfo updateAddressInfo(SimpleString addressName,
|
public AddressInfo updateAddressInfo(SimpleString addressName,
|
||||||
Collection<RoutingType> routingTypes) {
|
Collection<RoutingType> routingTypes) {
|
||||||
if (routingTypes == null) {
|
if (routingTypes == null || routingTypes.isEmpty()) {
|
||||||
return this.addressInfoMap.get(addressName);
|
return this.addressInfoMap.get(addressName);
|
||||||
} else {
|
} else {
|
||||||
return this.addressInfoMap.computeIfPresent(addressName, (name, oldAddressInfo) -> {
|
return this.addressInfoMap.computeIfPresent(addressName, (name, oldAddressInfo) -> {
|
||||||
|
|
|
@ -308,4 +308,13 @@ public class AddressingTest extends ActiveMQTestBase {
|
||||||
session.createConsumer(q1.getName());
|
session.createConsumer(q1.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testEmptyRoutingTypes() throws Exception {
|
||||||
|
server.addOrUpdateAddressInfo(new AddressInfo(SimpleString.toSimpleString("xy")));
|
||||||
|
server.stop();
|
||||||
|
server.start();
|
||||||
|
server.addOrUpdateAddressInfo(new AddressInfo(SimpleString.toSimpleString("xy")));
|
||||||
|
server.stop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue