From commits-return-50481-apmail-activemq-commits-archive=activemq.apache.org@activemq.apache.org Fri Feb 9 14:15:19 2018 Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 53C6C1747C for ; Fri, 9 Feb 2018 14:15:19 +0000 (UTC) Received: (qmail 30801 invoked by uid 500); 9 Feb 2018 14:15:19 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 30753 invoked by uid 500); 9 Feb 2018 14:15:19 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 30744 invoked by uid 99); 9 Feb 2018 14:15:19 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Feb 2018 14:15:19 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 208C6DFBC6; Fri, 9 Feb 2018 14:15:19 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: clebertsuconic@apache.org To: commits@activemq.apache.org Date: Fri, 09 Feb 2018 14:15:19 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/2] activemq-artemis git commit: [ARTEMIS-1670] NPE was found in when dropping durable subscriptions from a topic Repository: activemq-artemis Updated Branches: refs/heads/1.x 466f5f8eb -> a90adaed5 [ARTEMIS-1670] NPE was found in when dropping durable subscriptions from a topic Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/3e212c09 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/3e212c09 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/3e212c09 Branch: refs/heads/1.x Commit: 3e212c09db04e22c76d443bede5ac00a2c86ba6a Parents: 466f5f8 Author: Lin Gao Authored: Fri Feb 9 15:02:12 2018 +0800 Committer: Lin Gao Committed: Fri Feb 9 15:02:12 2018 +0800 ---------------------------------------------------------------------- .../activemq/artemis/jms/server/impl/JMSServerManagerImpl.java | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3e212c09/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java ---------------------------------------------------------------------- diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java index 96004e9..4c18741 100644 --- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java +++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java @@ -1666,6 +1666,9 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback @Override public boolean delete(SimpleString queueName) throws Exception { Queue queue = server.locateQueue(queueName); + if (queue == null) { + return false; + } SimpleString address = queue.getAddress(); AddressSettings settings = server.getAddressSettingsRepository().getMatch(address.toString()); long consumerCount = queue.getConsumerCount();