ARTEMIS-1137 handle empty routing type on restart
This commit is contained in:
parent
e22f77d8ca
commit
578c0fabb2
|
@ -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