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 9583F9E7F for ; Sat, 25 Feb 2012 20:00:20 +0000 (UTC) Received: (qmail 7262 invoked by uid 500); 25 Feb 2012 20:00:20 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 7211 invoked by uid 500); 25 Feb 2012 20:00: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 7200 invoked by uid 99); 25 Feb 2012 20:00:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Feb 2012 20:00:19 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.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; Sat, 25 Feb 2012 20:00:18 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 101522388865 for ; Sat, 25 Feb 2012 19:59:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1293674 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/AbstractQueue.h Date: Sat, 25 Feb 2012 19:59:58 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120225195959.101522388865@eris.apache.org> Author: tabish Date: Sat Feb 25 19:59:58 2012 New Revision: 1293674 URL: http://svn.apache.org/viewvc?rev=1293674&view=rev Log: fix for: https://issues.apache.org/jira/browse/AMQCPP-389 Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/AbstractQueue.h Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/AbstractQueue.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/AbstractQueue.h?rev=1293674&r1=1293673&r2=1293674&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/AbstractQueue.h (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/AbstractQueue.h Sat Feb 25 19:59:58 2012 @@ -58,9 +58,9 @@ namespace util { * This implementation returns true if offer succeeds, else throws an * IllegalStateException. */ - virtual bool add( const E& value ) { + virtual bool add(const E& value) { - if( offer( value ) ) { + if (this->offer(value )) { return true; } @@ -75,14 +75,14 @@ namespace util { * throws an IllegalArgumentException if so, otherwise it delegates the add to * the AbstractCollection's addAll implementation. */ - virtual bool addAll( const Collection& collection ) { + virtual bool addAll(const Collection& collection) { - if( this == &collection ) { + if (this == &collection) { throw decaf::lang::exceptions::IllegalArgumentException( __FILE__, __LINE__, "A Queue cannot be added to itself." ); } - return AbstractCollection::addAll( collection ); + return AbstractCollection::addAll(collection); } using AbstractCollection::remove; @@ -95,7 +95,7 @@ namespace util { virtual E remove() { E result; - if( this->poll( result ) == true ) { + if (this->poll(result) == true) { return result; } @@ -112,7 +112,7 @@ namespace util { virtual E element() const { E result; - if( this->peek( result ) == true ) { + if (this->peek( result ) == true) { return result; } @@ -127,7 +127,7 @@ namespace util { */ virtual void clear() { - if( this->isEmpty() ) { + if (this->isEmpty()) { return; } @@ -135,10 +135,9 @@ namespace util { bool successful = true; do { - successful = this->poll( result ); - } while( successful ); + successful = this->poll(result); + } while(successful); } - }; }}