Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 46152 invoked from network); 7 Dec 2010 13:35:55 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Dec 2010 13:35:55 -0000 Received: (qmail 4715 invoked by uid 500); 7 Dec 2010 13:35:55 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 4646 invoked by uid 500); 7 Dec 2010 13:35:54 -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 4639 invoked by uid 99); 7 Dec 2010 13:35:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Dec 2010 13:35:54 +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; Tue, 07 Dec 2010 13:35:52 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 18788238890A; Tue, 7 Dec 2010 13:35:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1043042 - /activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala Date: Tue, 07 Dec 2010 13:35:31 -0000 To: commits@activemq.apache.org From: chirino@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101207133531.18788238890A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: chirino Date: Tue Dec 7 13:35:30 2010 New Revision: 1043042 URL: http://svn.apache.org/viewvc?rev=1043042&view=rev Log: Fix NPE. Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala?rev=1043042&r1=1043041&r2=1043042&view=diff ============================================================================== --- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala (original) +++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala Tue Dec 7 13:35:30 2010 @@ -337,6 +337,7 @@ class Queue(val host: VirtualHost, var i // swap out messages. cur = entries.getHead while( cur!=null ) { + val next = cur.getNext val loaded = cur.as_loaded if( loaded!=null ) { if( cur.prefetch_flags==0 && !loaded.acquired ) { @@ -346,7 +347,7 @@ class Queue(val host: VirtualHost, var i cur.load // just in case it's getting flushed. } } - cur = cur.getNext + cur = next }