[ARTEMIS-1670] NPE was found in when dropping durable subscriptions from a topic

This commit is contained in:
Lin Gao 2018-02-09 15:02:12 +08:00
parent 466f5f8ebe
commit 3e212c09db
1 changed files with 3 additions and 0 deletions

View File

@ -1666,6 +1666,9 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
@Override @Override
public boolean delete(SimpleString queueName) throws Exception { public boolean delete(SimpleString queueName) throws Exception {
Queue queue = server.locateQueue(queueName); Queue queue = server.locateQueue(queueName);
if (queue == null) {
return false;
}
SimpleString address = queue.getAddress(); SimpleString address = queue.getAddress();
AddressSettings settings = server.getAddressSettingsRepository().getMatch(address.toString()); AddressSettings settings = server.getAddressSettingsRepository().getMatch(address.toString());
long consumerCount = queue.getConsumerCount(); long consumerCount = queue.getConsumerCount();