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 5FF49D2D4 for ; Tue, 27 Nov 2012 20:33:58 +0000 (UTC) Received: (qmail 39468 invoked by uid 500); 27 Nov 2012 20:33:58 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 39427 invoked by uid 500); 27 Nov 2012 20:33:58 -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 39370 invoked by uid 99); 27 Nov 2012 20:33:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Nov 2012 20:33:58 +0000 X-ASF-Spam-Status: No, hits=-1999.6 required=5.0 tests=ALL_TRUSTED,FILL_THIS_FORM_FRAUD_PHISH,T_FILL_THIS_FORM_SHORT 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, 27 Nov 2012 20:33:54 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 005632388A66; Tue, 27 Nov 2012 20:33:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1414381 [1/2] - in /activemq/activemq-cpp/trunk/activemq-cpp/src: main/decaf/lang/ main/decaf/util/ main/decaf/util/concurrent/ test-benchmarks/decaf/util/ test-integration/activemq/test/ test-integration/activemq/test/openwire/ test-integ... Date: Tue, 27 Nov 2012 20:33:10 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121127203334.005632388A66@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tabish Date: Tue Nov 27 20:32:53 2012 New Revision: 1414381 URL: http://svn.apache.org/viewvc?rev=1414381&view=rev Log: Fix up a bunch of compiler warnings, now builds clean on gcc v4.6.3 Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/ArrayPointer.h activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashCode.h activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/PriorityQueue.h activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/CopyOnWriteArrayList.h activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/Executors.h activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/FutureTask.h activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/HashMapBenchmark.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/LinkedListBenchmark.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/PropertiesBenchmark.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/QueueBenchmark.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/SetBenchmark.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/StlListBenchmark.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/CMSTestFixture.h activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/CmsConnectionStartStopTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/CmsSendWithAsyncCallbackTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/CmsTemplateTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/ExpirationTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MessagePriorityTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/SlowListenerTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireClientAckTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.h activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireTempDestinationTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireXATransactionsTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/stomp/StompDurableTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/util/CMSListener.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/util/CMSListener.h activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/util/CMSProvider.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/util/IntegrationCommon.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/ArrayPointerTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/MathTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/PointerTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/ThreadLocalTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/ThreadTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/ServerSocketTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/ServerSocketTest.h activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketFactoryTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/nio/BufferTest.h activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/AbstractListTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/AbstractSequentialListTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/HashMapTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/PropertiesTest.h activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/TimerTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/TimerTest.h activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/AbstractExecutorServiceTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/CopyOnWriteArrayListTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/CountDownLatchTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/CountDownLatchTest.h activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/ExecutorsTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/ExecutorsTestSupport.h activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/FutureTaskTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/LinkedBlockingQueueTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/MutexTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/SemaphoreTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/ThreadPoolExecutorTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/ThreadPoolExecutorTest.h activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/atomic/AtomicBooleanTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/atomic/AtomicIntegerTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/atomic/AtomicReferenceTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/locks/AbstractQueuedSynchronizerTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/locks/LockSupportTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/locks/ReentrantLockTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/locks/ReentrantReadWriteLockTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/DeflaterOutputStreamTest.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/InflaterInputStreamTest.cpp Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/ArrayPointer.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/ArrayPointer.h?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/ArrayPointer.h (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/ArrayPointer.h Tue Nov 27 20:32:53 2012 @@ -436,13 +436,14 @@ namespace std{ * can be stored in STL Maps, etc. */ template< typename T > - struct less< decaf::lang::ArrayPointer > : - public binary_function, - decaf::lang::ArrayPointer, bool> - { + struct less< decaf::lang::ArrayPointer > { + + typedef decaf::lang::ArrayPointer first_argument_type; + typedef decaf::lang::ArrayPointer second_argument_type; + typedef bool result_type; + bool operator()(const decaf::lang::ArrayPointer& left, - const decaf::lang::ArrayPointer& right) const - { + const decaf::lang::ArrayPointer& right) const { return less()(left.get(), right.get()); } }; Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashCode.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashCode.h?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashCode.h (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashCode.h Tue Nov 27 20:32:53 2012 @@ -37,7 +37,7 @@ namespace util { typedef T argument_type; typedef int result_type; - virtual ~HashCodeUnaryBase(); + virtual ~HashCodeUnaryBase() {} }; /** Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/PriorityQueue.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/PriorityQueue.h?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/PriorityQueue.h (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/PriorityQueue.h Tue Nov 27 20:32:53 2012 @@ -41,6 +41,7 @@ namespace util { static const int DEFAULT_CAPACITY; static const int DEFAULT_CAPACITY_RATIO; + virtual ~PriorityQueueBase() {} }; /** @@ -230,6 +231,7 @@ namespace util { */ PriorityQueue& operator= ( const Collection& source ) { this->getFromCollection( source ); + return *this; } /** @@ -240,6 +242,7 @@ namespace util { */ PriorityQueue& operator= ( const PriorityQueue& source ) { this->getFromPriorityQueue( source ); + return *this; } public: Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/CopyOnWriteArrayList.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/CopyOnWriteArrayList.h?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/CopyOnWriteArrayList.h (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/CopyOnWriteArrayList.h Tue Nov 27 20:32:53 2012 @@ -75,6 +75,12 @@ namespace concurrent { capacity = newlen; } } + + private: + + Array(const Array&); + Array operator= (const Array&); + }; private: Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/Executors.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/Executors.h?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/Executors.h (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/Executors.h Tue Nov 27 20:32:53 2012 @@ -60,6 +60,11 @@ namespace concurrent { bool owns; E result; + private: + + RunnableAdapter(const RunnableAdapter&); + RunnableAdapter operator= (const RunnableAdapter&); + public: RunnableAdapter(decaf::lang::Runnable* task, bool owns, const E& result) : Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/FutureTask.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/FutureTask.h?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/FutureTask.h (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/FutureTask.h Tue Nov 27 20:32:53 2012 @@ -70,6 +70,11 @@ namespace concurrent { bool owns; T result; + private: + + FutureTaskAdapter(const FutureTaskAdapter&); + FutureTaskAdapter operator= (const FutureTaskAdapter&); + public: FutureTaskAdapter(decaf::lang::Runnable* task, const T& result, bool owns = true) : @@ -137,6 +142,11 @@ namespace concurrent { */ decaf::lang::Thread* runner; + private: + + FutureTaskSync(const FutureTaskSync&); + FutureTaskSync operator= (const FutureTaskSync&); + public: FutureTaskSync(FutureTask* parent, Callable* callable) : Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/HashMapBenchmark.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/HashMapBenchmark.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/HashMapBenchmark.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/HashMapBenchmark.cpp Tue Nov 27 20:32:53 2012 @@ -25,7 +25,7 @@ using namespace decaf::util; using namespace decaf::lang; //////////////////////////////////////////////////////////////////////////////// -HashMapBenchmark::HashMapBenchmark() { +HashMapBenchmark::HashMapBenchmark() : stringMap(), intMap() { } //////////////////////////////////////////////////////////////////////////////// Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/LinkedListBenchmark.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/LinkedListBenchmark.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/LinkedListBenchmark.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/LinkedListBenchmark.cpp Tue Nov 27 20:32:53 2012 @@ -69,7 +69,6 @@ void LinkedListBenchmark::run(){ } std::string tempStr = ""; - int tempInt = 0; for( int i = 0; i < numRuns / 2; ++i ) { @@ -81,7 +80,7 @@ void LinkedListBenchmark::run(){ } while( intIter->hasNext() ){ - tempInt = intIter->next(); + intIter->next(); } delete strIter; Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/PropertiesBenchmark.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/PropertiesBenchmark.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/PropertiesBenchmark.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/PropertiesBenchmark.cpp Tue Nov 27 20:32:53 2012 @@ -33,12 +33,11 @@ void PropertiesBenchmark::run() { int numRuns = 250; std::string result = ""; - bool hasIt = false; Properties copy; for( int i = 0; i < numRuns; ++i ) { properties.setProperty( "test", "value" ); - hasIt = properties.hasProperty( "test" ); + properties.hasProperty( "test" ); result = properties.getProperty( "test" ); properties.remove( "test" ); } Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/QueueBenchmark.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/QueueBenchmark.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/QueueBenchmark.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/QueueBenchmark.cpp Tue Nov 27 20:32:53 2012 @@ -71,6 +71,7 @@ void QueueBenchmark::run(){ resultStr = stringQ.back(); resultInt = intQ.front(); resultInt = intQ.back(); + resultInt++; stringQ.pop(); intQ.pop(); } Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/SetBenchmark.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/SetBenchmark.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/SetBenchmark.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/SetBenchmark.cpp Tue Nov 27 20:32:53 2012 @@ -78,6 +78,7 @@ void SetBenchmark::run(){ while( intIter->hasNext() ){ tempInt = intIter->next(); + tempInt++; } delete strIter; Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/StlListBenchmark.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/StlListBenchmark.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/StlListBenchmark.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/StlListBenchmark.cpp Tue Nov 27 20:32:53 2012 @@ -82,6 +82,7 @@ void StlListBenchmark::run(){ while( intIter->hasNext() ){ tempInt = intIter->next(); + tempInt++; } delete strIter; Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/CMSTestFixture.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/CMSTestFixture.h?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/CMSTestFixture.h (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/CMSTestFixture.h Tue Nov 27 20:32:53 2012 @@ -38,6 +38,9 @@ namespace test { public: + CMSTestFixture() : CppUnit::TestFixture(), cmsProvider() { + } + virtual ~CMSTestFixture() { } Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/CmsConnectionStartStopTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/CmsConnectionStartStopTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/CmsConnectionStartStopTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/CmsConnectionStartStopTest.cpp Tue Nov 27 20:32:53 2012 @@ -42,7 +42,8 @@ using namespace decaf::util::concurrent; using namespace decaf::lang; //////////////////////////////////////////////////////////////////////////////// -CmsConnectionStartStopTest::CmsConnectionStartStopTest() { +CmsConnectionStartStopTest::CmsConnectionStartStopTest() : + CMSTestFixture(), startedConnection(), stoppedConnection() { } //////////////////////////////////////////////////////////////////////////////// @@ -124,6 +125,11 @@ namespace { Random rand; CopyOnWriteArrayList* exceptions; + private: + + CreateSessionRunnable(const CreateSessionRunnable&); + CreateSessionRunnable& operator= (const CreateSessionRunnable&); + public: CreateSessionRunnable(Connection* connection, CopyOnWriteArrayList* exceptions) : @@ -149,6 +155,11 @@ namespace { Random rand; CopyOnWriteArrayList* exceptions; + private: + + StartStopRunnable(const StartStopRunnable&); + StartStopRunnable& operator= (const StartStopRunnable&); + public: StartStopRunnable(Connection* connection, CopyOnWriteArrayList* exceptions) : Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/CmsSendWithAsyncCallbackTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/CmsSendWithAsyncCallbackTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/CmsSendWithAsyncCallbackTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/CmsSendWithAsyncCallbackTest.cpp Tue Nov 27 20:32:53 2012 @@ -66,6 +66,11 @@ namespace { CountDownLatch* latch; + private: + + MyAsyncCallback(const MyAsyncCallback&); + MyAsyncCallback& operator= (const MyAsyncCallback&); + public: MyAsyncCallback(CountDownLatch* latch) : cms::AsyncCallback(), latch(latch) {} Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/CmsTemplateTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/CmsTemplateTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/CmsTemplateTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/CmsTemplateTest.cpp Tue Nov 27 20:32:53 2012 @@ -49,8 +49,8 @@ namespace test { public: - TextMessageCreator(const std::string& text) { - this->text = text; + TextMessageCreator(const std::string& text) : + activemq::cmsutil::MessageCreator(), text(text) { } virtual ~TextMessageCreator() { @@ -75,17 +75,17 @@ namespace test { public: - Sender(const std::string& url, bool pubSub, const std::string& destName, int count) { + Sender(const std::string& url, bool pubSub, const std::string& destName, int count) : + decaf::lang::Runnable(), cf(), cmsTemplate(), count(count) { + cf.setBrokerURI(url); cmsTemplate.setConnectionFactory(&cf); cmsTemplate.setPubSubDomain(pubSub); cmsTemplate.setDefaultDestinationName(destName); cmsTemplate.setDeliveryPersistent(false); - this->count = count; } - virtual ~Sender() { - } + virtual ~Sender() {} virtual void run() { try { @@ -114,14 +114,13 @@ namespace test { public: Receiver(const std::string& url, bool pubSub, const std::string& destName, int count) : - ready(1) { + decaf::lang::Runnable(), cf(), cmsTemplate(), count(count), numReceived(), ready(1) { cf.setBrokerURI(url); cmsTemplate.setConnectionFactory(&cf); cmsTemplate.setPubSubDomain(pubSub); cmsTemplate.setDefaultDestinationName(destName); cmsTemplate.setDeliveryPersistent(false); - this->count = count; } virtual ~Receiver() { Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/ExpirationTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/ExpirationTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/ExpirationTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/ExpirationTest.cpp Tue Nov 27 20:32:53 2012 @@ -47,14 +47,16 @@ namespace test { public: - Producer( const std::string& brokerURL, const std::string& destination, - int numMessages, long long timeToLive ) { + Producer(const std::string& brokerURL, const std::string& destination, + int numMessages, long long timeToLive ) : Runnable(), + cmsProvider(), + numMessages(numMessages), + timeToLive(timeToLive), + disableTimeStamps(false) { + this->cmsProvider.reset( new CMSProvider( brokerURL ) ); this->cmsProvider->setDestinationName( destination ); this->cmsProvider->setTopic( false ); - this->numMessages = numMessages; - this->timeToLive = timeToLive; - this->disableTimeStamps = false; } virtual ~Producer(){ @@ -107,16 +109,15 @@ namespace test { public: - Consumer( const std::string& brokerURL, const std::string& destination, long waitMillis ) { + Consumer( const std::string& brokerURL, const std::string& destination, long waitMillis ) : + Runnable(), cmsProvider(), waitMillis(waitMillis), numReceived(0) { + this->cmsProvider.reset( new CMSProvider( brokerURL ) ); this->cmsProvider->setTopic( false ); this->cmsProvider->setDestinationName( destination ); - this->waitMillis = waitMillis; - this->numReceived = 0; } - virtual ~Consumer() { - } + virtual ~Consumer() {} virtual int getNumReceived() const{ return numReceived; Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MessagePriorityTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MessagePriorityTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MessagePriorityTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MessagePriorityTest.cpp Tue Nov 27 20:32:53 2012 @@ -45,10 +45,15 @@ namespace { int num; int priority; + private: + + ProducerThread(const ProducerThread&); + ProducerThread& operator= (const ProducerThread&); + public: ProducerThread( Session* session, Destination* destination, int num, int priority ) : - session( session ), destination( destination ), num( num ), priority( priority ) { + session(session), destination(destination), num(num), priority(priority) { } virtual ~ProducerThread() {} Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/SlowListenerTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/SlowListenerTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/SlowListenerTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/SlowListenerTest.cpp Tue Nov 27 20:32:53 2012 @@ -45,7 +45,7 @@ namespace test{ unsigned int count; decaf::util::StlSet threadIds; - SlowListener() { count = 0; } + SlowListener() : MessageListener(), count(0), threadIds() {} virtual ~SlowListener() {} void onMessage( const cms::Message* message ) { Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireClientAckTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireClientAckTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireClientAckTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireClientAckTest.cpp Tue Nov 27 20:32:53 2012 @@ -44,21 +44,19 @@ namespace { public: - MyMesageListener( bool dontAck = false ) { - this->dontAck = dontAck; - } + MyMesageListener( bool dontAck = false ) : MessageListener(), dontAck(dontAck) {} virtual ~MyMesageListener() {} - virtual void onMessage( const Message* message ) { + virtual void onMessage(const Message* message) { - CPPUNIT_ASSERT( message != NULL ); + CPPUNIT_ASSERT( message != NULL); - if( !dontAck ) { + if (!dontAck) { try { message->acknowledge(); - } catch( Exception& e ) { + } catch (Exception& e) { e.printStackTrace(); } } Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.cpp Tue Nov 27 20:32:53 2012 @@ -55,7 +55,8 @@ using namespace activemq::test; using namespace activemq::test::openwire; //////////////////////////////////////////////////////////////////////////////// -OpenwireJmsRecoverTest::OpenwireJmsRecoverTest() { +OpenwireJmsRecoverTest::OpenwireJmsRecoverTest() : + CppUnit::TestFixture(), factory(), connection(), destination() { } //////////////////////////////////////////////////////////////////////////////// @@ -154,6 +155,11 @@ namespace { CountDownLatch* doneCountDownLatch; int counter; + private: + + ClientAckMessageListener(const ClientAckMessageListener&); + ClientAckMessageListener& operator= (const ClientAckMessageListener&); + public: ClientAckMessageListener(cms::Session* session, std::vector* errorMessages, CountDownLatch* doneCountDownLatch) @@ -187,6 +193,7 @@ namespace { default: errorMessages->push_back(string("Got too many messages: ") + Long::toString(counter)); doneCountDownLatch->countDown(); + break; } } catch (Exception& e) { errorMessages->push_back(string("Got exception: ") + e.getMessage()); @@ -235,6 +242,11 @@ namespace { CountDownLatch* doneCountDownLatch; int counter; + private: + + AutoAckMessageListener(const AutoAckMessageListener&); + AutoAckMessageListener& operator= (const AutoAckMessageListener&); + public: AutoAckMessageListener(cms::Session* session, std::vector* errorMessages, CountDownLatch* doneCountDownLatch) @@ -266,6 +278,7 @@ namespace { default: errorMessages->push_back(string("Got too many messages: ") + Long::toString(counter)); doneCountDownLatch->countDown(); + break; } } catch (Exception& e) { errorMessages->push_back(string("Got exception: ") + e.getMessage()); Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.h?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.h (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.h Tue Nov 27 20:32:53 2012 @@ -47,6 +47,11 @@ namespace openwire { cms::Connection* connection; cms::Destination* destination; + private: + + OpenwireJmsRecoverTest(const OpenwireJmsRecoverTest&); + OpenwireJmsRecoverTest& operator= (const OpenwireJmsRecoverTest&); + public: OpenwireJmsRecoverTest(); Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireTempDestinationTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireTempDestinationTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireTempDestinationTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireTempDestinationTest.cpp Tue Nov 27 20:32:53 2012 @@ -57,10 +57,8 @@ namespace openwire{ public: - Requester( const std::string& url, - const std::string& destination, - unsigned int messageCount ) - : messageCount( messageCount ), ready( 1 ), responses( messageCount ) { + Requester(const std::string& url, const std::string& destination, unsigned int messageCount ) : + cmsProvider(), tempTopicConsumer(), numReceived(0), messageCount(messageCount), ready(1), responses(messageCount) { this->cmsProvider.reset( new CMSProvider( url ) ); this->cmsProvider->setDestinationName( destination ); @@ -71,8 +69,6 @@ namespace openwire{ cmsProvider->getSession()->createConsumer( cmsProvider->getTempDestination() ) ); this->tempTopicConsumer->setMessageListener( this ); - - this->numReceived = 0; } virtual ~Requester() {} @@ -133,19 +129,13 @@ namespace openwire{ public: - Responder( const std::string& url, - const std::string& destination, - unsigned int messageCount ) - : messageCount( messageCount ), requests( messageCount ) { - - this->cmsProvider.reset( new CMSProvider( url ) ); - - this->cmsProvider->setDestinationName( destination ); - this->cmsProvider->getNoDestProducer()->setDeliveryMode( - DeliveryMode::NON_PERSISTENT ); - this->cmsProvider->getConsumer()->setMessageListener( this ); + Responder(const std::string& url, const std::string& destination, unsigned int messageCount) : + cmsProvider(), numReceived(0), messageCount(messageCount), requests(messageCount) { - this->numReceived = 0; + this->cmsProvider.reset(new CMSProvider(url)); + this->cmsProvider->setDestinationName(destination); + this->cmsProvider->getNoDestProducer()->setDeliveryMode(DeliveryMode::NON_PERSISTENT); + this->cmsProvider->getConsumer()->setMessageListener(this); } virtual ~Responder() {} Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireXATransactionsTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireXATransactionsTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireXATransactionsTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireXATransactionsTest.cpp Tue Nov 27 20:32:53 2012 @@ -56,7 +56,7 @@ const int OpenwireXATransactionsTest::ba const int OpenwireXATransactionsTest::batchSize = 20; //////////////////////////////////////////////////////////////////////////////// -OpenwireXATransactionsTest::OpenwireXATransactionsTest() { +OpenwireXATransactionsTest::OpenwireXATransactionsTest() : txIdGen() { } //////////////////////////////////////////////////////////////////////////////// Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/stomp/StompDurableTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/stomp/StompDurableTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/stomp/StompDurableTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/stomp/StompDurableTest.cpp Tue Nov 27 20:32:53 2012 @@ -22,7 +22,7 @@ using namespace activemq::test; using namespace activemq::test::stomp; //////////////////////////////////////////////////////////////////////////////// -StompDurableTest::StompDurableTest() { +StompDurableTest::StompDurableTest() : DurableTest(), subscriptionName() { } //////////////////////////////////////////////////////////////////////////////// Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/util/CMSListener.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/util/CMSListener.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/util/CMSListener.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/util/CMSListener.cpp Tue Nov 27 20:32:53 2012 @@ -29,7 +29,7 @@ using namespace decaf::util; using namespace decaf::util::concurrent; //////////////////////////////////////////////////////////////////////////////// -CMSListener::CMSListener( cms::Session* session ) : session( session ) { +CMSListener::CMSListener(cms::Session* session) : numReceived(), mutex(), session(session) { this->reset(); } Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/util/CMSListener.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/util/CMSListener.h?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/util/CMSListener.h (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/util/CMSListener.h Tue Nov 27 20:32:53 2012 @@ -35,6 +35,11 @@ namespace util { decaf::util::concurrent::Mutex mutex; cms::Session* session; + private: + + CMSListener(const CMSListener&); + CMSListener& operator= (const CMSListener&); + public: CMSListener( cms::Session* session ); Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/util/CMSProvider.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/util/CMSProvider.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/util/CMSProvider.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/util/CMSProvider.cpp Tue Nov 27 20:32:53 2012 @@ -39,14 +39,12 @@ using namespace decaf::lang::exceptions; //////////////////////////////////////////////////////////////////////////////// CMSProvider::CMSProvider(const std::string& brokerURL, cms::Session::AcknowledgeMode ackMode) : - brokerURL(brokerURL), ackMode(ackMode) { + brokerURL(brokerURL), ackMode(ackMode), username(), password(), clientId(), + destinationName(), topic(true), durable(false), subscription(), connectionFactory(), + connection(), session(), consumer(), producer(), noDestProducer(), destination(), tempDestination() { - this->topic = true; this->destinationName = UUID::randomUUID().toString(); - this->durable = false; this->subscription = UUID::randomUUID().toString(); - this->username = ""; - this->password = ""; this->initialize(); } Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/util/IntegrationCommon.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/util/IntegrationCommon.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/util/IntegrationCommon.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/util/IntegrationCommon.cpp Tue Nov 27 20:32:53 2012 @@ -26,7 +26,7 @@ const unsigned int IntegrationCommon::de bool IntegrationCommon::debug = false; //////////////////////////////////////////////////////////////////////////////// -IntegrationCommon::IntegrationCommon() { +IntegrationCommon::IntegrationCommon() : urlCommon(), stompURL(), openwireURL() { this->urlCommon = "tcp://localhost:"; this->stompURL = this->urlCommon + "61613?wireFormat=stomp"; Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/ArrayPointerTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/ArrayPointerTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/ArrayPointerTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/ArrayPointerTest.cpp Tue Nov 27 20:32:53 2012 @@ -85,6 +85,8 @@ namespace { struct X { ArrayPointer next; + + X() : next() {} }; template @@ -464,6 +466,11 @@ namespace { Mutex mutex; bool closed; + private: + + Gate(const Gate&); + Gate& operator= (const Gate&); + public: Gate() : enterLatch(NULL), leaveLatch(NULL), mutex(), closed(true) {} @@ -507,9 +514,14 @@ namespace { Gate* gate; ArrayPointer s; + private: + + ArrayPointerTestThread(const ArrayPointerTestThread&); + ArrayPointerTestThread& operator= (const ArrayPointerTestThread&); + public: - ArrayPointerTestThread(Gate *gate) : gate(gate) {} + ArrayPointerTestThread(Gate *gate) : gate(gate), s() {} virtual ~ArrayPointerTestThread() {} void setString(ArrayPointer s) { Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/MathTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/MathTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/MathTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/MathTest.cpp Tue Nov 27 20:32:53 2012 @@ -26,10 +26,7 @@ using namespace decaf; using namespace decaf::lang; //////////////////////////////////////////////////////////////////////////////// -MathTest::MathTest() { - this->HYP = Math::sqrt( 2.0 ); - this->OPP = 1.0; - this->ADJ = 1.0; +MathTest::MathTest() : HYP(Math::sqrt(2.0)), OPP(1.0), ADJ(1.0) { } //////////////////////////////////////////////////////////////////////////////// Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/PointerTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/PointerTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/PointerTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/PointerTest.cpp Tue Nov 27 20:32:53 2012 @@ -41,12 +41,14 @@ protected: public: - virtual ~TestClassBase(){} + TestClassBase() : content() {} + + virtual ~TestClassBase() {} virtual std::string returnHello() = 0; int getSize() const { - return content.size(); + return (int)content.size(); } }; @@ -102,6 +104,8 @@ public: //////////////////////////////////////////////////////////////////////////////// struct X { Pointer next; + + X() : next() {} }; //////////////////////////////////////////////////////////////////////////////// @@ -444,19 +448,24 @@ void PointerTest::testDynamicCast() { class Gate { private: - CountDownLatch * enterLatch; - CountDownLatch * leaveLatch; + CountDownLatch* enterLatch; + CountDownLatch* leaveLatch; Mutex mutex; bool closed; +private: + + Gate(const Gate&); + Gate& operator= (const Gate&); + public: - Gate() : closed( true ) {} + Gate() : enterLatch(), leaveLatch(), mutex(), closed(true) {} virtual ~Gate() {} - void open( int count ) { - leaveLatch = new CountDownLatch( count ); - enterLatch = new CountDownLatch( count ); + void open(int count) { + leaveLatch = new CountDownLatch(count); + enterLatch = new CountDownLatch(count); mutex.lock(); closed = false; mutex.notifyAll(); @@ -465,7 +474,7 @@ public: void enter() { mutex.lock(); - while( closed ) + while (closed) mutex.wait(); enterLatch->countDown(); if (enterLatch->getCount() == 0) { @@ -492,19 +501,24 @@ private: Gate *gate; Pointer s; +private: + + PointerTestThread(const PointerTestThread&); + PointerTestThread& operator= (const PointerTestThread&); + public: - PointerTestThread( Gate *gate ) : gate( gate ) {} + PointerTestThread(Gate *gate) : gate(gate), s() {} virtual ~PointerTestThread() {} - void setString( Pointer s ) { + void setString(Pointer s) { this->s = s; } virtual void run() { - for( int j = 0; j < 1000; j++ ) { + for (int j = 0; j < 1000; j++) { gate->enter(); - s.reset( NULL ); + s.reset(NULL); gate->leave(); } } Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/ThreadLocalTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/ThreadLocalTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/ThreadLocalTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/ThreadLocalTest.cpp Tue Nov 27 20:32:53 2012 @@ -85,6 +85,11 @@ namespace { std::string* result; StringThreadLocal* local; + private: + + TestGetRunnable(const TestGetRunnable&); + TestGetRunnable& operator= (const TestGetRunnable&); + public: TestGetRunnable(StringThreadLocal* local, std::string* result) : Runnable(), result(result), local(local) {} @@ -136,6 +141,11 @@ namespace { StringThreadLocal* local; + private: + + TestSetRunnable(const TestSetRunnable&); + TestSetRunnable& operator= (const TestSetRunnable&); + public: TestSetRunnable(StringThreadLocal* local) : Runnable(), local(local) {} Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/ThreadTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/ThreadTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/ThreadTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/ThreadTest.cpp Tue Nov 27 20:32:53 2012 @@ -59,7 +59,7 @@ namespace lang{ } } - SimpleThread( int d ) : delay( 0 ) { + SimpleThread( int d ) : delay(0), lock() { if( d >= 0 ) { delay = d; } @@ -74,9 +74,14 @@ namespace lang{ Thread* parent; bool sync; + private: + + ChildThread1(const ChildThread1&); + ChildThread1& operator= (const ChildThread1&); + public: - ChildThread1(Thread* parent, bool sync) : Thread(), parent(parent), sync(sync) {} + ChildThread1(Thread* parent, bool sync) : Thread(), parent(parent), sync(sync), lock() {} virtual ~ChildThread1() {} @@ -154,7 +159,7 @@ namespace lang{ public: - Delegate() { stuff = 0; } + Delegate() : stuff(0) {} virtual ~Delegate(){} int getStuff(){ @@ -173,7 +178,7 @@ namespace lang{ public: - Derived() { stuff = 0; } + Derived() : stuff(0) {} virtual ~Derived() {} int getStuff() { @@ -258,6 +263,11 @@ namespace lang{ bool interrupted; Thread* parent; + private: + + InterruptibleJoiner(const InterruptibleJoiner&); + InterruptibleJoiner& operator= (const InterruptibleJoiner&); + public: InterruptibleJoiner(Thread* parent) : Runnable(), interrupted(false), parent(parent) {} Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/ServerSocketTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/ServerSocketTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/ServerSocketTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/ServerSocketTest.cpp Tue Nov 27 20:32:53 2012 @@ -37,18 +37,17 @@ namespace { std::auto_ptr clientS; int port; - SocketClient( int port ) : Runnable(), clientS( NULL ), port( port ) { - + SocketClient(int port) : Runnable(), clientS(NULL), port(port) { } virtual void run() { - try{ - Thread::sleep( 1000 ); - this->clientS.reset( new Socket( "127.0.0.1", port ) ); - Thread::sleep( 1000 ); - } catch( InterruptedException& ex ) { - } catch( Exception& ex ) { + try { + Thread::sleep(1000); + this->clientS.reset(new Socket("127.0.0.1", port)); + Thread::sleep(1000); + } catch (InterruptedException& ex) { + } catch (Exception& ex) { ex.printStackTrace(); } } @@ -59,7 +58,7 @@ namespace { } //////////////////////////////////////////////////////////////////////////////// -ServerSocketTest::ServerSocketTest() { +ServerSocketTest::ServerSocketTest() : ssconn(), theThread() { } //////////////////////////////////////////////////////////////////////////////// @@ -154,10 +153,14 @@ namespace{ bool* interrupted; ServerSocket* ss; + private: + + TestAcceptRunnable(const TestAcceptRunnable&); + TestAcceptRunnable& operator= (const TestAcceptRunnable&); + public: - TestAcceptRunnable( bool* interrupted, ServerSocket* ss ) : interrupted( interrupted ), ss( ss ) { - } + TestAcceptRunnable(bool* interrupted, ServerSocket* ss) : interrupted(interrupted), ss(ss) {} virtual void run() { try{ Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/ServerSocketTest.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/ServerSocketTest.h?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/ServerSocketTest.h (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/ServerSocketTest.h Tue Nov 27 20:32:53 2012 @@ -46,6 +46,11 @@ namespace net { decaf::lang::Thread* theThread; + private: + + ServerSocketTest(const ServerSocketTest&); + ServerSocketTest& operator= (const ServerSocketTest&); + public: ServerSocketTest(); Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketFactoryTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketFactoryTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketFactoryTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketFactoryTest.cpp Tue Nov 27 20:32:53 2012 @@ -38,7 +38,7 @@ const int SocketFactoryTest::DEFAULT_POR //////////////////////////////////////////////////////////////////////////////// namespace{ - class MyServerThread : public lang::Thread{ + class MyServerThread: public lang::Thread { private: bool done; @@ -51,62 +51,60 @@ namespace{ public: - MyServerThread(){ - done = false; - numClients = 0; + MyServerThread() : done(false), numClients(0), lastMessage(), mutex() { } - virtual ~MyServerThread(){ + + virtual ~MyServerThread() { stop(); } - std::string getLastMessage(){ + std::string getLastMessage() { return lastMessage; } - int getNumClients(){ + int getNumClients() { return numClients; } - virtual void stop(){ + virtual void stop() { done = true; } - virtual void run(){ - try{ + virtual void run() { + try { unsigned char buf[1000]; ServerSocket server; - server.bind( "127.0.0.1", SocketFactoryTest::DEFAULT_PORT ); + server.bind("127.0.0.1", SocketFactoryTest::DEFAULT_PORT); net::Socket* socket = server.accept(); server.close(); - socket->setSoLinger( false, 0 ); + socket->setSoLinger(false, 0); - synchronized(&mutex) - { + synchronized(&mutex) { numClients++; mutex.notifyAll(); } - while( !done && socket != NULL ){ + while (!done && socket != NULL) { io::InputStream* stream = socket->getInputStream(); - memset( buf, 0, 1000 ); - try{ - if( stream->read( buf, 1000, 0, 1000 ) == -1 ) { + memset(buf, 0, 1000); + try { + if (stream->read(buf, 1000, 0, 1000) == -1) { done = true; continue; } - lastMessage = (char*)buf; + lastMessage = (char*) buf; - if( strcmp( (char*)buf, "reply" ) == 0 ){ + if (strcmp((char*) buf, "reply") == 0) { io::OutputStream* output = socket->getOutputStream(); - output->write( (unsigned char*)"hello", (int)strlen("hello"), 0, (int)strlen("hello") ); + output->write((unsigned char*) "hello", (int) strlen("hello"), 0, (int) strlen("hello")); } - }catch( io::IOException& ex ){ + } catch (io::IOException& ex) { done = true; } } @@ -120,112 +118,96 @@ namespace{ mutex.notifyAll(); } - }catch( io::IOException& ex ){ - printf("%s\n", ex.getMessage().c_str() ); - CPPUNIT_ASSERT( false ); - }catch( ... ){ - CPPUNIT_ASSERT( false ); + } catch (io::IOException& ex) { + printf("%s\n", ex.getMessage().c_str()); + CPPUNIT_ASSERT( false); + } catch (...) { + CPPUNIT_ASSERT( false); } } }; } //////////////////////////////////////////////////////////////////////////////// -void SocketFactoryTest::test() -{ - try - { +void SocketFactoryTest::test() { + try { MyServerThread serverThread; serverThread.start(); - Thread::sleep( 500 ); + Thread::sleep(500); SocketFactory* factory = SocketFactory::getDefault(); - std::auto_ptr client( factory->createSocket( "127.0.0.1", SocketFactoryTest::DEFAULT_PORT ) ); + std::auto_ptr client(factory->createSocket("127.0.0.1", SocketFactoryTest::DEFAULT_PORT)); - client->setSoLinger( false, 0 ); + client->setSoLinger(false, 0); - synchronized(&serverThread.mutex) - { - if(serverThread.getNumClients() != 1) - { + synchronized(&serverThread.mutex) { + if (serverThread.getNumClients() != 1) { serverThread.mutex.wait(10000); } } - CPPUNIT_ASSERT( client->isConnected() ); + CPPUNIT_ASSERT( client->isConnected()); - CPPUNIT_ASSERT( serverThread.getNumClients() == 1 ); + CPPUNIT_ASSERT( serverThread.getNumClients() == 1); client->close(); - synchronized(&serverThread.mutex) - { - if(serverThread.getNumClients() != 0) - { + synchronized(&serverThread.mutex) { + if (serverThread.getNumClients() != 0) { serverThread.mutex.wait(10000); } } - CPPUNIT_ASSERT( serverThread.getNumClients() == 0 ); + CPPUNIT_ASSERT( serverThread.getNumClients() == 0); serverThread.stop(); serverThread.join(); - } - catch(lang::Exception ex) - { + } catch (lang::Exception& ex) { ex.printStackTrace(); - CPPUNIT_ASSERT( false ); + CPPUNIT_ASSERT( false); } } //////////////////////////////////////////////////////////////////////////////// -void SocketFactoryTest::testNoDelay() -{ - try - { +void SocketFactoryTest::testNoDelay() { + try { MyServerThread serverThread; serverThread.start(); - Thread::sleep( 40 ); + Thread::sleep(40); SocketFactory* factory = SocketFactory::getDefault(); - std::auto_ptr client( factory->createSocket( "127.0.0.1", SocketFactoryTest::DEFAULT_PORT ) ); + std::auto_ptr client(factory->createSocket("127.0.0.1", SocketFactoryTest::DEFAULT_PORT)); - client->setSoLinger( false, 0 ); - client->setTcpNoDelay( true ); + client->setSoLinger(false, 0); + client->setTcpNoDelay(true); - CPPUNIT_ASSERT( client->getTcpNoDelay() == true ); + CPPUNIT_ASSERT( client->getTcpNoDelay() == true); - synchronized(&serverThread.mutex) - { - if(serverThread.getNumClients() != 1) - { + synchronized(&serverThread.mutex) { + if (serverThread.getNumClients() != 1) { serverThread.mutex.wait(1000); } } - CPPUNIT_ASSERT( client->isConnected() ); + CPPUNIT_ASSERT( client->isConnected()); - CPPUNIT_ASSERT( serverThread.getNumClients() == 1 ); + CPPUNIT_ASSERT( serverThread.getNumClients() == 1); client->close(); - synchronized(&serverThread.mutex) - { - if(serverThread.getNumClients() != 0) - { + synchronized(&serverThread.mutex) { + if (serverThread.getNumClients() != 0) { serverThread.mutex.wait(1000); } } - CPPUNIT_ASSERT( serverThread.getNumClients() == 0 ); + CPPUNIT_ASSERT( serverThread.getNumClients() == 0); serverThread.stop(); serverThread.join(); - } - catch(lang::Exception ex) - { - CPPUNIT_ASSERT( false ); + } catch (lang::Exception& ex) { + CPPUNIT_ASSERT( false); } } Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketTest.cpp Tue Nov 27 20:32:53 2012 @@ -336,10 +336,14 @@ namespace { ServerSocket* server; + private: + + GetOutputStreamRunnable(const GetOutputStreamRunnable&); + GetOutputStreamRunnable& operator= (const GetOutputStreamRunnable&); + public: GetOutputStreamRunnable( ServerSocket* server ) : server( server ) { - } virtual void run() { @@ -467,7 +471,7 @@ namespace { public: - MyServerThread() : Thread(), done( false ), numClients( 0 ), lastMessage() { + MyServerThread() : Thread(), done( false ), numClients( 0 ), lastMessage(), server(), mutex() { server.reset( new ServerSocket(0) ); } Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/nio/BufferTest.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/nio/BufferTest.h?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/nio/BufferTest.h (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/nio/BufferTest.h Tue Nov 27 20:32:53 2012 @@ -62,9 +62,14 @@ namespace nio{ bool isReadOnly() const { return false; } }; + private: + + BufferTest(const BufferTest&); + BufferTest& operator= (const BufferTest&); + public: - BufferTest() {} + BufferTest() : buffer() {} virtual ~BufferTest() {} void setUp() { Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/AbstractListTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/AbstractListTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/AbstractListTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/AbstractListTest.cpp Tue Nov 27 20:32:53 2012 @@ -42,7 +42,7 @@ namespace { public: - SimpleList() : AbstractList() { + SimpleList() : AbstractList(), array() { } virtual ~SimpleList() {} @@ -91,7 +91,7 @@ namespace { public: - MockArrayList() : AbstractList() { + MockArrayList() : AbstractList(), array() { } virtual ~MockArrayList() {} @@ -166,6 +166,7 @@ namespace { public: + MockList() : AbstractList(), array() {} virtual ~MockList() {} virtual E get( int index ) const { Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/AbstractSequentialListTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/AbstractSequentialListTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/AbstractSequentialListTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/AbstractSequentialListTest.cpp Tue Nov 27 20:32:53 2012 @@ -38,6 +38,7 @@ namespace { public: + SimpleList() : AbstractSequentialList(), list() {} virtual ~SimpleList() {} virtual ListIterator* listIterator( int index ) { Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/HashMapTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/HashMapTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/HashMapTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/HashMapTest.cpp Tue Nov 27 20:32:53 2012 @@ -341,7 +341,11 @@ namespace decaf { namespace util { template<> - struct HashCode : public std::unary_function { + struct HashCode { + + typedef MyKey argument_type; + typedef int result_type; + int operator()(const MyKey& arg) const { return arg.hashCode(); } Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/PropertiesTest.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/PropertiesTest.h?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/PropertiesTest.h (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/PropertiesTest.h Tue Nov 27 20:32:53 2012 @@ -50,7 +50,7 @@ namespace util { public: - PropertiesTest() {} + PropertiesTest() : testProperties() {} virtual ~PropertiesTest() {} Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/TimerTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/TimerTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/TimerTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/TimerTest.cpp Tue Nov 27 20:32:53 2012 @@ -47,10 +47,10 @@ namespace util{ long long startedAt; long long lastDelta; - TimerTaskReport() : startedAt( 0 ), lastDelta( 0 ) {} + TimerTaskReport() : wasRun(), startedAt(0), lastDelta(0) {} void reset() { - this->wasRun.set( 0 ); + this->wasRun.set(0); this->startedAt = 0; this->lastDelta = 0; } @@ -78,36 +78,40 @@ namespace util{ // The timer we belong to Timer* timer; + private: + + TimerTestTask(const TimerTestTask&); + TimerTestTask& operator= (const TimerTestTask&); + public: - TimerTestTask(AtomicInteger* counter, Mutex* gsync) { - this->report = NULL; - this->sleepInRun = false; - this->incrementCount = false; - this->terminateCount = -1; - this->timer = NULL; - this->timerCounter = counter; - this->gsync = gsync; + TimerTestTask(AtomicInteger* counter, Mutex* gsync) : gsync(gsync), + timerCounter(counter), + report(NULL), + sleepInRun(false), + incrementCount(false), + terminateCount(-1), + timer(NULL) { } - TimerTestTask(TimerTaskReport* report, AtomicInteger* counter, Mutex* gsync) { - this->report = report; - this->sleepInRun = false; - this->incrementCount = false; - this->terminateCount = -1; - this->timer = NULL; - this->timerCounter = counter; - this->gsync = gsync; + TimerTestTask(TimerTaskReport* report, AtomicInteger* counter, Mutex* gsync) : + gsync(gsync), + timerCounter(counter), + report(report), + sleepInRun(false), + incrementCount(false), + terminateCount(-1), + timer(NULL) { } - TimerTestTask(Timer* t, TimerTaskReport* report, AtomicInteger* counter, Mutex* gsync) { - this->report = report; - this->sleepInRun = false; - this->incrementCount = false; - this->terminateCount = -1; - this->timer = t; - this->timerCounter = counter; - this->gsync = gsync; + TimerTestTask(Timer* t, TimerTaskReport* report, AtomicInteger* counter, Mutex* gsync) : + gsync(gsync), + timerCounter(counter), + report(report), + sleepInRun(false), + incrementCount(false), + terminateCount(-1), + timer(t) { } virtual ~TimerTestTask() {} @@ -155,10 +159,14 @@ namespace util{ TimerTaskReport* report; + private: + + SlowThenFastTask(const SlowThenFastTask&); + SlowThenFastTask& operator= (const SlowThenFastTask&); + public: - SlowThenFastTask( TimerTaskReport* report ) { - this->report = report; + SlowThenFastTask( TimerTaskReport* report ) : report(report) { } virtual ~SlowThenFastTask() {} Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/TimerTest.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/TimerTest.h?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/TimerTest.h (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/TimerTest.h Tue Nov 27 20:32:53 2012 @@ -55,7 +55,7 @@ namespace util { public: - TimerTest() {} + TimerTest() : timerCounter(), gsync() {} virtual ~TimerTest() {} void testConstructor(); Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/AbstractExecutorServiceTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/AbstractExecutorServiceTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/AbstractExecutorServiceTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/AbstractExecutorServiceTest.cpp Tue Nov 27 20:32:53 2012 @@ -245,6 +245,11 @@ namespace { AbstractExecutorServiceTest* parent; + private: + + TestInterruptedSubmitCallable(const TestInterruptedSubmitCallable&); + TestInterruptedSubmitCallable operator= (const TestInterruptedSubmitCallable&); + public: TestInterruptedSubmitCallable(AbstractExecutorServiceTest* parent) : @@ -270,6 +275,11 @@ namespace { AbstractExecutorServiceTest* parent; ThreadPoolExecutor* executor; + private: + + TestInterruptedSubmitRunnable(const TestInterruptedSubmitRunnable&); + TestInterruptedSubmitRunnable operator= (const TestInterruptedSubmitRunnable&); + public: TestInterruptedSubmitRunnable(AbstractExecutorServiceTest* parent, ThreadPoolExecutor* executor) : @@ -321,6 +331,11 @@ namespace { AbstractExecutorServiceTest* parent; Callable* target; + private: + + CallingRunnable(const CallingRunnable&); + CallingRunnable operator= (const CallingRunnable&); + public: CallingRunnable(AbstractExecutorServiceTest* parent, Callable* target) : @@ -346,6 +361,11 @@ namespace { AbstractExecutorServiceTest* parent; ThreadPoolExecutor* executor; + private: + + TestSubmitIECallable(const TestSubmitIECallable&); + TestSubmitIECallable operator= (const TestSubmitIECallable&); + public: TestSubmitIECallable(AbstractExecutorServiceTest* parent, ThreadPoolExecutor* executor) : Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/CopyOnWriteArrayListTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/CopyOnWriteArrayListTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/CopyOnWriteArrayListTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/CopyOnWriteArrayListTest.cpp Tue Nov 27 20:32:53 2012 @@ -985,6 +985,11 @@ namespace { Random rand; CopyOnWriteArrayList >* list; + private: + + AddRemoveItemRunnable(const AddRemoveItemRunnable&); + AddRemoveItemRunnable operator= (const AddRemoveItemRunnable&); + public: AddRemoveItemRunnable(CopyOnWriteArrayList >* list) : @@ -1008,6 +1013,11 @@ namespace { Random rand; CopyOnWriteArrayList >* list; + private: + + IterateAndExecuteMethodRunnable(const IterateAndExecuteMethodRunnable&); + IterateAndExecuteMethodRunnable operator= (const IterateAndExecuteMethodRunnable&); + public: IterateAndExecuteMethodRunnable(CopyOnWriteArrayList >* list) : Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/CountDownLatchTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/CountDownLatchTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/CountDownLatchTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/CountDownLatchTest.cpp Tue Nov 27 20:32:53 2012 @@ -100,6 +100,11 @@ namespace { CountDownLatch* latch; CountDownLatchTest* parent; + private: + + TestAwaitRunnable(const TestAwaitRunnable&); + TestAwaitRunnable operator= (const TestAwaitRunnable&); + public: TestAwaitRunnable(CountDownLatch* latch, CountDownLatchTest* parent) : @@ -147,6 +152,11 @@ namespace { CountDownLatch* latch; CountDownLatchTest* parent; + private: + + TestTimedAwaitRunnable(const TestTimedAwaitRunnable&); + TestTimedAwaitRunnable operator= (const TestTimedAwaitRunnable&); + public: TestTimedAwaitRunnable(CountDownLatch* latch, CountDownLatchTest* parent) : @@ -193,6 +203,11 @@ namespace { CountDownLatch* latch; CountDownLatchTest* parent; + private: + + TestAwaitInterruptedExceptionRunnable(const TestAwaitInterruptedExceptionRunnable&); + TestAwaitInterruptedExceptionRunnable operator= (const TestAwaitInterruptedExceptionRunnable&); + public: TestAwaitInterruptedExceptionRunnable(CountDownLatch* latch, CountDownLatchTest* parent) : @@ -235,6 +250,11 @@ namespace { CountDownLatch* latch; CountDownLatchTest* parent; + private: + + TestTimedAwaitInterruptedExceptionRunnable(const TestTimedAwaitInterruptedExceptionRunnable&); + TestTimedAwaitInterruptedExceptionRunnable operator= (const TestTimedAwaitInterruptedExceptionRunnable&); + public: TestTimedAwaitInterruptedExceptionRunnable(CountDownLatch* latch, CountDownLatchTest* parent) : @@ -278,6 +298,11 @@ namespace { CountDownLatch* latch; CountDownLatchTest* parent; + private: + + TestAwaitTimeoutRunnable(const TestAwaitTimeoutRunnable&); + TestAwaitTimeoutRunnable operator= (const TestAwaitTimeoutRunnable&); + public: TestAwaitTimeoutRunnable(CountDownLatch* latch, CountDownLatchTest* parent) : Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/CountDownLatchTest.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/CountDownLatchTest.h?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/CountDownLatchTest.h (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/CountDownLatchTest.h Tue Nov 27 20:32:53 2012 @@ -47,15 +47,19 @@ namespace concurrent{ protected: - class MyThread : public lang::Thread - { + class MyThread : public lang::Thread { public: CountDownLatch* latch; + private: + + MyThread(const MyThread&); + MyThread operator= (const MyThread&); + public: - MyThread(){} + MyThread() : latch() {} virtual ~MyThread(){} virtual void run(){ Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/ExecutorsTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/ExecutorsTest.cpp?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/ExecutorsTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/ExecutorsTest.cpp Tue Nov 27 20:32:53 2012 @@ -37,6 +37,11 @@ namespace { CountDownLatch* shutdown; + private: + + DefaultThreadFactoryRunnable(const DefaultThreadFactoryRunnable&); + DefaultThreadFactoryRunnable operator= (const DefaultThreadFactoryRunnable&); + public: DefaultThreadFactoryRunnable(CountDownLatch* shutdown) : Runnable(), shutdown(shutdown) { Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/ExecutorsTestSupport.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/ExecutorsTestSupport.h?rev=1414381&r1=1414380&r2=1414381&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/ExecutorsTestSupport.h (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/ExecutorsTestSupport.h Tue Nov 27 20:32:53 2012 @@ -112,9 +112,14 @@ namespace concurrent { ExecutorsTestSupport* parent; + private: + + ShortRunnable(const ShortRunnable&); + ShortRunnable operator= (const ShortRunnable&); + public: - ShortRunnable(ExecutorsTestSupport* parent) : decaf::lang::Runnable() { + ShortRunnable(ExecutorsTestSupport* parent) : decaf::lang::Runnable(), parent(parent) { } virtual ~ShortRunnable() {} @@ -133,9 +138,14 @@ namespace concurrent { ExecutorsTestSupport* parent; + private: + + SmallRunnable(const SmallRunnable&); + SmallRunnable operator= (const SmallRunnable&); + public: - SmallRunnable(ExecutorsTestSupport* parent) : decaf::lang::Runnable() { + SmallRunnable(ExecutorsTestSupport* parent) : decaf::lang::Runnable(), parent(parent) { } virtual ~SmallRunnable() {} @@ -155,6 +165,11 @@ namespace concurrent { ExecutorsTestSupport* parent; + private: + + SmallCallable(const SmallCallable&); + SmallCallable operator= (const SmallCallable&); + public: SmallCallable(ExecutorsTestSupport* parent) : decaf::util::concurrent::Callable(), parent(parent) { @@ -178,9 +193,14 @@ namespace concurrent { ExecutorsTestSupport* parent; + private: + + SmallInterruptedRunnable(const SmallInterruptedRunnable&); + SmallInterruptedRunnable operator= (const SmallInterruptedRunnable&); + public: - SmallInterruptedRunnable(ExecutorsTestSupport* parent) : decaf::lang::Runnable() { + SmallInterruptedRunnable(ExecutorsTestSupport* parent) : decaf::lang::Runnable(), parent(parent) { } virtual ~SmallInterruptedRunnable() {} @@ -199,9 +219,14 @@ namespace concurrent { ExecutorsTestSupport* parent; + private: + + SmallPossiblyInterruptedRunnable(const SmallPossiblyInterruptedRunnable&); + SmallPossiblyInterruptedRunnable operator= (const SmallPossiblyInterruptedRunnable&); + public: - SmallPossiblyInterruptedRunnable(ExecutorsTestSupport* parent) : decaf::lang::Runnable() { + SmallPossiblyInterruptedRunnable(ExecutorsTestSupport* parent) : decaf::lang::Runnable(), parent(parent) { } virtual ~SmallPossiblyInterruptedRunnable() {} @@ -219,9 +244,14 @@ namespace concurrent { ExecutorsTestSupport* parent; + private: + + MediumRunnable(const MediumRunnable&); + MediumRunnable operator= (const MediumRunnable&); + public: - MediumRunnable(ExecutorsTestSupport* parent) : decaf::lang::Runnable() { + MediumRunnable(ExecutorsTestSupport* parent) : decaf::lang::Runnable(), parent(parent) { } virtual ~MediumRunnable() {} @@ -240,9 +270,14 @@ namespace concurrent { ExecutorsTestSupport* parent; + private: + + MediumInterruptedRunnable(const MediumInterruptedRunnable&); + MediumInterruptedRunnable operator= (const MediumInterruptedRunnable&); + public: - MediumInterruptedRunnable(ExecutorsTestSupport* parent) : decaf::lang::Runnable() { + MediumInterruptedRunnable(ExecutorsTestSupport* parent) : decaf::lang::Runnable(), parent(parent) { } virtual ~MediumInterruptedRunnable() {} @@ -261,9 +296,14 @@ namespace concurrent { ExecutorsTestSupport* parent; + private: + + MediumPossiblyInterruptedRunnable(const MediumPossiblyInterruptedRunnable&); + MediumPossiblyInterruptedRunnable operator= (const MediumPossiblyInterruptedRunnable&); + public: - MediumPossiblyInterruptedRunnable(ExecutorsTestSupport* parent) : decaf::lang::Runnable() { + MediumPossiblyInterruptedRunnable(ExecutorsTestSupport* parent) : decaf::lang::Runnable(), parent(parent) { } virtual ~MediumPossiblyInterruptedRunnable() {} @@ -281,9 +321,14 @@ namespace concurrent { ExecutorsTestSupport* parent; + private: + + LongRunnable(const LongRunnable&); + LongRunnable operator= (const LongRunnable&); + public: - LongRunnable(ExecutorsTestSupport* parent) : decaf::lang::Runnable() { + LongRunnable(ExecutorsTestSupport* parent) : decaf::lang::Runnable(), parent(parent) { } virtual ~LongRunnable() {} @@ -302,9 +347,14 @@ namespace concurrent { ExecutorsTestSupport* parent; + private: + + LongInterruptedRunnable(const LongInterruptedRunnable&); + LongInterruptedRunnable operator= (const LongInterruptedRunnable&); + public: - LongInterruptedRunnable(ExecutorsTestSupport* parent) : decaf::lang::Runnable() { + LongInterruptedRunnable(ExecutorsTestSupport* parent) : decaf::lang::Runnable(), parent(parent) { } virtual ~LongInterruptedRunnable() {} @@ -323,9 +373,14 @@ namespace concurrent { ExecutorsTestSupport* parent; + private: + + LongPossiblyInterruptedRunnable(const LongPossiblyInterruptedRunnable&); + LongPossiblyInterruptedRunnable operator= (const LongPossiblyInterruptedRunnable&); + public: - LongPossiblyInterruptedRunnable(ExecutorsTestSupport* parent) : decaf::lang::Runnable() { + LongPossiblyInterruptedRunnable(ExecutorsTestSupport* parent) : decaf::lang::Runnable(), parent(parent) { } virtual ~LongPossiblyInterruptedRunnable() {} @@ -369,6 +424,11 @@ namespace concurrent { bool* done; + private: + + TrackedShortRunnable(const TrackedShortRunnable&); + TrackedShortRunnable operator= (const TrackedShortRunnable&); + public: TrackedShortRunnable(bool* done) : decaf::lang::Runnable(), done(done) { @@ -390,6 +450,11 @@ namespace concurrent { bool* done; + private: + + TrackedNoOpRunnable(const TrackedNoOpRunnable&); + TrackedNoOpRunnable operator= (const TrackedNoOpRunnable&); + public: TrackedNoOpRunnable(bool* done) : decaf::lang::Runnable(), done(done) { @@ -407,6 +472,11 @@ namespace concurrent { bool* done; + private: + + TrackedLongRunnable(const TrackedLongRunnable&); + TrackedLongRunnable operator= (const TrackedLongRunnable&); + public: TrackedLongRunnable(bool* done) : decaf::lang::Runnable(), done(done) {