Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 27789 invoked from network); 9 Sep 2009 10:11:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Sep 2009 10:11:39 -0000 Received: (qmail 57780 invoked by uid 500); 9 Sep 2009 10:11:39 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 57715 invoked by uid 500); 9 Sep 2009 10:11:39 -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 57496 invoked by uid 99); 9 Sep 2009 10:11:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Sep 2009 10:11:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Sep 2009 10:11:36 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 643E223888EC; Wed, 9 Sep 2009 10:11:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r812872 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java Date: Wed, 09 Sep 2009 10:11:16 -0000 To: commits@activemq.apache.org From: gtully@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090909101116.643E223888EC@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: gtully Date: Wed Sep 9 10:11:16 2009 New Revision: 812872 URL: http://svn.apache.org/viewvc?rev=812872&view=rev Log: resolve potential npe in test Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java?rev=812872&r1=812871&r2=812872&view=diff ============================================================================== --- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java (original) +++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java Wed Sep 9 10:11:16 2009 @@ -104,7 +104,9 @@ TextMessage msg; for (int idx = 0; idx < 10; ++idx) { msg = (TextMessage) consumer.receive(1000); - msg.acknowledge(); + if (msg != null) { + msg.acknowledge(); + } } keepGoing.set(false); }