This commit is contained in:
Clebert Suconic 2017-05-02 11:38:09 -04:00
commit c1df97de66
2 changed files with 10 additions and 1 deletions

View File

@ -232,7 +232,7 @@ public class SimpleAddressManager implements AddressManager {
@Override
public AddressInfo updateAddressInfo(SimpleString addressName,
Collection<RoutingType> routingTypes) {
if (routingTypes == null) {
if (routingTypes == null || routingTypes.isEmpty()) {
return this.addressInfoMap.get(addressName);
} else {
return this.addressInfoMap.computeIfPresent(addressName, (name, oldAddressInfo) -> {

View File

@ -308,4 +308,13 @@ public class AddressingTest extends ActiveMQTestBase {
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();
}
}