activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1050508 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main: activemq/cmsutil/ activemq/core/ decaf/lang/ decaf/util/ decaf/util/concurrent/
Date Fri, 17 Dec 2010 22:24:51 GMT
Author: tabish
Date: Fri Dec 17 22:24:50 2010
New Revision: 1050508

URL: http://svn.apache.org/viewvc?rev=1050508&view=rev
Log:
Fix a bunch of warnings that get shown with various versions of GCC especially if you turn
on -Weffc++

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CachedConsumer.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CachedProducer.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CmsAccessor.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CmsDestinationAccessor.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CmsTemplate.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CmsTemplate.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/DynamicDestinationResolver.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/PooledSession.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/ResourceLifecycleManager.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/ResourceLifecycleManager.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/SessionPool.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQQueueBrowser.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/ArrayPointer.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Pointer.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/AbstractList.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/ArrayList.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/LinkedList.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

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CachedConsumer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CachedConsumer.h?rev=1050508&r1=1050507&r2=1050508&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CachedConsumer.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CachedConsumer.h Fri
Dec 17 22:24:50 2010
@@ -32,10 +32,10 @@ namespace cmsutil {
 
         cms::MessageConsumer* consumer;
 
-    protected:
+    private:
 
-        CachedConsumer( const CachedConsumer& ) {}
-        CachedConsumer& operator= ( const CachedConsumer& ) { return *this; }
+        CachedConsumer( const CachedConsumer& );
+        CachedConsumer& operator= ( const CachedConsumer& );
 
     public:
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CachedProducer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CachedProducer.h?rev=1050508&r1=1050507&r2=1050508&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CachedProducer.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CachedProducer.h Fri
Dec 17 22:24:50 2010
@@ -32,10 +32,10 @@ namespace cmsutil {
 
         cms::MessageProducer* producer;
 
-    protected:
+    private:
 
-        CachedProducer( const CachedProducer& ) {}
-        CachedProducer& operator= ( const CachedProducer& ) { return *this; }
+        CachedProducer( const CachedProducer& );
+        CachedProducer& operator= ( const CachedProducer& );
 
     public:
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CmsAccessor.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CmsAccessor.h?rev=1050508&r1=1050507&r2=1050508&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CmsAccessor.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CmsAccessor.h Fri Dec
17 22:24:50 2010
@@ -47,8 +47,8 @@ namespace cmsutil {
 
     protected:
 
-        CmsAccessor( const CmsAccessor& ) {}
-        CmsAccessor& operator= ( const CmsAccessor& ) { return *this; }
+        CmsAccessor( const CmsAccessor& );
+        CmsAccessor& operator= ( const CmsAccessor& );
 
     public:
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CmsDestinationAccessor.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CmsDestinationAccessor.h?rev=1050508&r1=1050507&r2=1050508&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CmsDestinationAccessor.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CmsDestinationAccessor.h
Fri Dec 17 22:24:50 2010
@@ -50,10 +50,10 @@ namespace cmsutil {
          */
         bool pubSubDomain;
 
-    protected:
+    private:
 
-        CmsDestinationAccessor( const CmsDestinationAccessor& ) : CmsAccessor() {}
-        CmsDestinationAccessor& operator= ( const CmsDestinationAccessor& ) { return
*this; }
+        CmsDestinationAccessor( const CmsDestinationAccessor& );
+        CmsDestinationAccessor& operator= ( const CmsDestinationAccessor& );
 
     public:
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CmsTemplate.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CmsTemplate.cpp?rev=1050508&r1=1050507&r2=1050508&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CmsTemplate.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CmsTemplate.cpp Fri
Dec 17 22:24:50 2010
@@ -74,12 +74,40 @@ const int CmsTemplate::DEFAULT_PRIORITY 
 const long long CmsTemplate::DEFAULT_TIME_TO_LIVE = 0;
 
 ////////////////////////////////////////////////////////////////////////////////
-CmsTemplate::CmsTemplate() : CmsDestinationAccessor() {
+CmsTemplate::CmsTemplate() : CmsDestinationAccessor(),
+                             connection(NULL),
+                             sessionPools(),
+                             defaultDestination(NULL),
+                             defaultDestinationName(""),
+                             messageIdEnabled(false),
+                             messageTimestampEnabled(false),
+                             noLocal(false),
+                             receiveTimeout(0),
+                             explicitQosEnabled(false),
+                             deliveryMode(0),
+                             priority(0),
+                             timeToLive(0),
+                             initialized(false) {
+
     initDefaults();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-CmsTemplate::CmsTemplate( cms::ConnectionFactory* connectionFactory ) : CmsDestinationAccessor()
{
+CmsTemplate::CmsTemplate( cms::ConnectionFactory* connectionFactory ) : CmsDestinationAccessor(),
+                                                                        connection(NULL),
+                                                                        sessionPools(),
+                                                                        defaultDestination(NULL),
+                                                                        defaultDestinationName(""),
+                                                                        messageIdEnabled(false),
+                                                                        messageTimestampEnabled(false),
+                                                                        noLocal(false),
+                                                                        receiveTimeout(0),
+                                                                        explicitQosEnabled(false),
+                                                                        deliveryMode(0),
+                                                                        priority(0),
+                                                                        timeToLive(0),
+                                                                        initialized(false)
{
+
     initDefaults();
     setConnectionFactory(connectionFactory);
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CmsTemplate.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CmsTemplate.h?rev=1050508&r1=1050507&r2=1050508&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CmsTemplate.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/CmsTemplate.h Fri Dec
17 22:24:50 2010
@@ -127,9 +127,10 @@ namespace cmsutil {
 
             std::string destinationName;
 
-        protected:
+        private:
 
-            ResolveProducerExecutor& operator= ( const ResolveProducerExecutor& )
{ return *this; }
+            ResolveProducerExecutor( const ResolveProducerExecutor& );
+            ResolveProducerExecutor& operator= ( const ResolveProducerExecutor& );
 
         public:
 
@@ -155,10 +156,10 @@ namespace cmsutil {
             MessageCreator* messageCreator;
             CmsTemplate* parent;
 
-        protected:
+        private:
 
-            SendExecutor( const SendExecutor& ) : ProducerCallback() {}
-            SendExecutor& operator= ( const SendExecutor& ) { return *this; }
+            SendExecutor( const SendExecutor& );
+            SendExecutor& operator= ( const SendExecutor& );
 
         public:
 
@@ -189,10 +190,10 @@ namespace cmsutil {
             cms::Message* message;
             CmsTemplate* parent;
 
-        protected:
+        private:
 
-            ReceiveExecutor( const ReceiveExecutor& ) : SessionCallback() {}
-            ReceiveExecutor& operator= ( const ReceiveExecutor& )  { return *this;
}
+            ReceiveExecutor( const ReceiveExecutor& );
+            ReceiveExecutor& operator= ( const ReceiveExecutor& );
 
         public:
 
@@ -231,9 +232,10 @@ namespace cmsutil {
 
             std::string destinationName;
 
-        protected:
+        private:
 
-            ResolveReceiveExecutor& operator= ( const ResolveReceiveExecutor& ) {
return *this; }
+            ResolveReceiveExecutor( const ResolveReceiveExecutor& );
+            ResolveReceiveExecutor& operator= ( const ResolveReceiveExecutor& );
 
         public:
 
@@ -280,10 +282,10 @@ namespace cmsutil {
 
         bool initialized;
 
-    protected:
+    private:
 
-        CmsTemplate( const CmsTemplate& ) : CmsDestinationAccessor() {}
-        CmsTemplate& operator= ( const CmsTemplate& ) { return *this; }
+        CmsTemplate( const CmsTemplate& );
+        CmsTemplate& operator= ( const CmsTemplate& );
 
     public:
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/DynamicDestinationResolver.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/DynamicDestinationResolver.h?rev=1050508&r1=1050507&r2=1050508&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/DynamicDestinationResolver.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/DynamicDestinationResolver.h
Fri Dec 17 22:24:50 2010
@@ -75,10 +75,10 @@ namespace cmsutil {
          */
         ResourceLifecycleManager* resourceLifecycleManager;
 
-    protected:
+    private:
 
-        DynamicDestinationResolver( const DynamicDestinationResolver& ) {}
-        DynamicDestinationResolver& operator= ( const DynamicDestinationResolver&
) { return *this; }
+        DynamicDestinationResolver( const DynamicDestinationResolver& );
+        DynamicDestinationResolver& operator= ( const DynamicDestinationResolver&
);
 
     public:
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/PooledSession.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/PooledSession.h?rev=1050508&r1=1050507&r2=1050508&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/PooledSession.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/PooledSession.h Fri
Dec 17 22:24:50 2010
@@ -45,10 +45,10 @@ namespace cmsutil {
 
         decaf::util::StlMap<std::string, CachedConsumer*> consumerCache;
 
-    protected:
+    private:
 
-        PooledSession( const PooledSession& ) {}
-        PooledSession& operator= ( const PooledSession& ) { return *this; }
+        PooledSession( const PooledSession& );
+        PooledSession& operator= ( const PooledSession& );
 
     public:
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/ResourceLifecycleManager.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/ResourceLifecycleManager.cpp?rev=1050508&r1=1050507&r2=1050508&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/ResourceLifecycleManager.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/ResourceLifecycleManager.cpp
Fri Dec 17 22:24:50 2010
@@ -38,7 +38,12 @@ using namespace activemq::cmsutil;
     }
 
 ////////////////////////////////////////////////////////////////////////////////
-ResourceLifecycleManager::ResourceLifecycleManager() {
+ResourceLifecycleManager::ResourceLifecycleManager() : connections(),
+                                                       sessions(),
+                                                       destinations(),
+                                                       producers(),
+                                                       consumers() {
+
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/ResourceLifecycleManager.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/ResourceLifecycleManager.h?rev=1050508&r1=1050507&r2=1050508&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/ResourceLifecycleManager.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/ResourceLifecycleManager.h
Fri Dec 17 22:24:50 2010
@@ -51,8 +51,8 @@ namespace cmsutil {
 
     protected:
 
-        ResourceLifecycleManager( const ResourceLifecycleManager& ) {}
-        ResourceLifecycleManager& operator= ( const ResourceLifecycleManager& ) {
return *this; }
+        ResourceLifecycleManager( const ResourceLifecycleManager& );
+        ResourceLifecycleManager& operator= ( const ResourceLifecycleManager& );
 
     public:
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/SessionPool.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/SessionPool.h?rev=1050508&r1=1050507&r2=1050508&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/SessionPool.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/cmsutil/SessionPool.h Fri Dec
17 22:24:50 2010
@@ -51,10 +51,10 @@ namespace cmsutil {
 
         cms::Session::AcknowledgeMode acknowledgeMode;
 
-    protected:
+    private:
 
-        SessionPool( const SessionPool& ) {}
-        SessionPool& operator= ( const SessionPool& ) { return *this; }
+        SessionPool( const SessionPool& );
+        SessionPool& operator= ( const SessionPool& );
 
     public:
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp?rev=1050508&r1=1050507&r2=1050508&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp
Fri Dec 17 22:24:50 2010
@@ -81,6 +81,11 @@ namespace activemq{
 namespace core{
 
     class ConnectionConfig {
+    private:
+
+        ConnectionConfig( const ConnectionConfig& );
+        ConnectionConfig& operator= ( const ConnectionConfig& );
+
     public:
 
         typedef decaf::util::StlMap< Pointer<commands::ConsumerId>,
@@ -141,9 +146,18 @@ namespace core{
         decaf::util::concurrent::CopyOnWriteArrayList<ActiveMQSession*> activeSessions;
         decaf::util::concurrent::CopyOnWriteArrayList<transport::TransportListener*>
transportListeners;
 
-        ConnectionConfig() : clientIDSet( false ),
+        ConnectionConfig() : properties(),
+                             transport(),
+                             clientIdGenerator(),
+                             sessionIds(),
+                             tempDestinationIds(),
+                             localTransactionIds(),
+                             brokerURL(""),
+                             clientIDSet( false ),
                              isConnectionInfoSentToBroker( false ),
                              userSpecifiedClientID( false ),
+                             ensureConnectionInfoSentMutex(),
+                             mutex(),
                              dispatchAsync( true ),
                              alwaysSyncSend( false ),
                              useAsyncSend( false ),
@@ -155,7 +169,17 @@ namespace core{
                              producerWindowSize( 0 ),
                              defaultPrefetchPolicy( NULL ),
                              defaultRedeliveryPolicy( NULL ),
-                             exceptionListener( NULL ) {
+                             exceptionListener( NULL ),
+                             connectionInfo(),
+                             brokerInfo(),
+                             brokerWireFormatInfo(),
+                             transportInterruptionProcessingComplete(),
+                             brokerInfoReceived(),
+                             firstFailureError(),
+                             dispatchers(),
+                             activeProducers(),
+                             activeSessions(),
+                             transportListeners() {
 
             this->defaultPrefetchPolicy.reset( new DefaultPrefetchPolicy() );
             this->defaultRedeliveryPolicy.reset( new DefaultRedeliveryPolicy() );
@@ -182,7 +206,11 @@ namespace core{
 ActiveMQConnection::ActiveMQConnection( const Pointer<transport::Transport>& transport,
                                         const Pointer<decaf::util::Properties>&
properties ) :
     config( NULL ),
-    connectionMetaData( new ActiveMQConnectionMetaData() ) {
+    connectionMetaData( new ActiveMQConnectionMetaData() ),
+    started(false),
+    closed(false),
+    closing(false),
+    transportFailed(false) {
 
     Pointer<ConnectionConfig> configuration( new ConnectionConfig );
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQQueueBrowser.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQQueueBrowser.cpp?rev=1050508&r1=1050507&r2=1050508&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQQueueBrowser.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQQueueBrowser.cpp
Fri Dec 17 22:24:50 2010
@@ -89,7 +89,19 @@ ActiveMQQueueBrowser::ActiveMQQueueBrows
                                             const Pointer<commands::ConsumerId>&
consumerId,
                                             const Pointer<commands::ActiveMQDestination>&
destination,
                                             const std::string& selector,
-                                            bool dispatchAsync ) {
+                                            bool dispatchAsync ) : cms::QueueBrowser(),
+                                                                   cms::MessageEnumeration(),
+                                                                   session(NULL),
+                                                                   consumerId(),
+                                                                   destination(),
+                                                                   selector(),
+                                                                   dispatchAsync(false),
+                                                                   queue(NULL),
+                                                                   closed(false),
+                                                                   mutex(),
+                                                                   wait(),
+                                                                   browseDone(),
+                                                                   browser(NULL) {
 
     if( session == NULL ) {
         throw ActiveMQException(

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp?rev=1050508&r1=1050507&r2=1050508&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp Fri
Dec 17 22:24:50 2010
@@ -80,9 +80,14 @@ namespace {
 
         ActiveMQSession* session;
 
+    private:
+
+        CloseSynhcronization( const CloseSynhcronization& );
+        CloseSynhcronization& operator= ( const CloseSynhcronization& );
+
     public:
 
-        CloseSynhcronization( ActiveMQSession* session ) {
+        CloseSynhcronization( ActiveMQSession* session ) : Synchronization(), session(NULL)
{
 
             if( session == NULL ) {
                 throw NullPointerException(
@@ -119,6 +124,11 @@ namespace core{
                                      ActiveMQConsumer*,
                                      commands::ConsumerId::COMPARATOR> ConsumersMap;
 
+    private:
+
+        SessionConfig( const SessionConfig& );
+        SessionConfig& operator= ( const SessionConfig& );
+
     public:
 
         /**
@@ -133,8 +143,7 @@ namespace core{
 
     public:
 
-        SessionConfig() : synchronizationRegistered( false ), producers() {
-        }
+        SessionConfig() : synchronizationRegistered( false ), producers() {}
 
         ~SessionConfig() {}
     };
@@ -145,7 +154,18 @@ namespace core{
 ActiveMQSession::ActiveMQSession( ActiveMQConnection* connection,
                                   const Pointer<SessionId>& id,
                                   cms::Session::AcknowledgeMode ackMode,
-                                  const Properties& properties ) {
+                                  const Properties& properties ) : config( new SessionConfig
),
+                                                                   sessionInfo(),
+                                                                   transaction(),
+                                                                   connection(NULL),
+                                                                   consumers(),
+                                                                   closed(false),
+                                                                   executor(),
+                                                                   ackMode(),
+                                                                   producerIds(),
+                                                                   producerSequenceIds(),
+                                                                   consumerIds(),
+                                                                   lastDeliveredSequenceId(0){
 
     if( id == NULL || connection == NULL ) {
         throw ActiveMQException(
@@ -153,8 +173,6 @@ ActiveMQSession::ActiveMQSession( Active
             "ActiveMQSession::ActiveMQSession - Constructor called with NULL data");
     }
 
-    this->config = new SessionConfig();
-
     this->sessionInfo.reset( new SessionInfo() );
     this->sessionInfo->setAckMode( ackMode );
     this->sessionInfo->setSessionId( id );
@@ -253,11 +271,15 @@ void ActiveMQSession::dispose() {
         ActiveMQSession* session;
         ActiveMQConnection* connection;
 
+    private:
+
+        Finalizer( const Finalizer& );
+        Finalizer& operator= ( const Finalizer& );
+
     public:
 
-        Finalizer(ActiveMQSession* session, ActiveMQConnection* connection) {
-            this->session = session;
-            this->connection = connection;
+        Finalizer(ActiveMQSession* session, ActiveMQConnection* connection) :
+            session( session ), connection( connection ) {
         }
 
         ~Finalizer() {

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp?rev=1050508&r1=1050507&r2=1050508&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp
Fri Dec 17 22:24:50 2010
@@ -35,9 +35,8 @@ using namespace decaf::util;
 using namespace decaf::util::concurrent;
 
 ////////////////////////////////////////////////////////////////////////////////
-ActiveMQSessionExecutor::ActiveMQSessionExecutor( ActiveMQSession* session ) {
-
-    this->session = session;
+ActiveMQSessionExecutor::ActiveMQSessionExecutor( ActiveMQSession* session ) :
+            session( session ), messageQueue(), taskRunner() {
 
     if( this->session->getConnection()->isMessagePrioritySupported() ) {
         this->messageQueue.reset( new SimplePriorityMessageDispatchChannel() );

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=1050508&r1=1050507&r2=1050508&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 Fri Dec 17
22:24:50 2010
@@ -404,6 +404,8 @@ namespace lang {
     class ArrayPointerComparator : public decaf::util::Comparator< ArrayPointer<T,R>
> {
     public:
 
+        virtual ~ArrayPointerComparator() {}
+
         // Allows for operator less on types that implement Comparable or provide
         // a workable operator <
         virtual bool operator() ( const ArrayPointer<T,R>& left, const ArrayPointer<T,R>&
right ) const {

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Pointer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Pointer.h?rev=1050508&r1=1050507&r2=1050508&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Pointer.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Pointer.h Fri Dec 17 22:24:50
2010
@@ -354,6 +354,8 @@ namespace lang {
     class PointerComparator : public decaf::util::Comparator< Pointer<T,R> >
{
     public:
 
+        virtual ~PointerComparator() {}
+
         // Allows for operator less on types that implement Comparable or provide
         // a workable operator <
         virtual bool operator() ( const Pointer<T,R>& left, const Pointer<T,R>&
right ) const {

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/AbstractList.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/AbstractList.h?rev=1050508&r1=1050507&r2=1050508&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/AbstractList.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/AbstractList.h Fri Dec 17
22:24:50 2010
@@ -232,6 +232,11 @@ namespace util {
             int expectedModCount;
             int lastPosition;
 
+        private:
+
+            ConstSimpleListIterator( const ConstSimpleListIterator& );
+            ConstSimpleListIterator operator= ( const ConstSimpleListIterator& );
+
         public:
 
             ConstSimpleListIterator( const AbstractList<E>* parent, int start ) :

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/ArrayList.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/ArrayList.h?rev=1050508&r1=1050507&r2=1050508&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/ArrayList.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/ArrayList.h Fri Dec 17 22:24:50
2010
@@ -96,6 +96,20 @@ namespace util {
 
     public:
 
+        ArrayList<E>& operator= ( const ArrayList<E>& list ) {
+            this->clear();
+            this->addAll( list );
+            return *this;
+        }
+
+        ArrayList<E>& operator= ( const Collection<E>& collection ) {
+            this->clear();
+            this->addAll( 0, collection );
+            return *this;
+        }
+
+    public:
+
         /**
          * Increases the capacity of this ArrayList instance, if necessary, to ensure that
it can
          * hold at least the number of elements specified by the minimum capacity argument.
 If the

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/LinkedList.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/LinkedList.h?rev=1050508&r1=1050507&r2=1050508&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/LinkedList.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/LinkedList.h Fri Dec 17 22:24:50
2010
@@ -63,6 +63,11 @@ namespace util {
             ListNode<U>* prev;
             ListNode<U>* next;
 
+        private:
+
+            ListNode( const ListNode& );
+            ListNode& operator= ( const ListNode& );
+
         public:
 
             ListNode() : value(), prev(NULL), next(NULL) {
@@ -748,6 +753,11 @@ namespace util {
             int expectedModCount;
             bool canRemove;
 
+        private:
+
+            ReverseIterator( const ReverseIterator& );
+            ReverseIterator operator= ( const ReverseIterator& );
+
         public:
 
             ReverseIterator( LinkedList<E>* list ) :
@@ -821,6 +831,11 @@ namespace util {
             const LinkedList<E>* list;
             const ListNode<E>* current;
 
+        private:
+
+            ConstReverseIterator( const ConstReverseIterator& );
+            ConstReverseIterator operator= ( const ConstReverseIterator& );
+
         public:
 
             ConstReverseIterator( const LinkedList<E>* list ) :

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=1050508&r1=1050507&r2=1050508&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 Fri Dec 17
22:24:50 2010
@@ -82,6 +82,11 @@ namespace util {
         class PriorityQueueIterator : public Iterator<E> {
         private:
 
+            PriorityQueueIterator( const PriorityQueueIterator& );
+            PriorityQueueIterator& operator= ( const PriorityQueueIterator& );
+
+        private:
+
             int position;
             bool allowRemove;
             PriorityQueue* queue;
@@ -120,13 +125,17 @@ namespace util {
         };
 
         class ConstPriorityQueueIterator : public PriorityQueueIterator {
+        private:
+
+            ConstPriorityQueueIterator( const ConstPriorityQueueIterator& );
+            ConstPriorityQueueIterator& operator= ( const ConstPriorityQueueIterator&
);
+
         public:
 
             ConstPriorityQueueIterator( const PriorityQueue* queue ) :
                 PriorityQueueIterator( const_cast<PriorityQueue*>( queue ) ) {}
 
             virtual void remove() {
-
                 throw lang::exceptions::UnsupportedOperationException(
                     __FILE__, __LINE__,
                     "PriorityQueue::Iterator::remove - Not Valid on a Const Iterator" );
@@ -228,6 +237,8 @@ namespace util {
             this->getFromPriorityQueue( source );
         }
 
+    public:
+
         virtual decaf::util::Iterator<E>* iterator() {
             return new PriorityQueueIterator( this );
         }

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=1050508&r1=1050507&r2=1050508&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
Fri Dec 17 22:24:50 2010
@@ -48,6 +48,11 @@ namespace concurrent {
             ArrayPointer<E> array;
             int position;
 
+        private:
+
+            ArrayListIterator( const ArrayListIterator& );
+            ArrayListIterator& operator= ( const ArrayListIterator& );
+
         public:
 
             ArrayListIterator( const ArrayPointer<E>& array, int index ) :
@@ -113,14 +118,18 @@ namespace concurrent {
 
     public:
 
-        CopyOnWriteArrayList() : List<E>() {
+        CopyOnWriteArrayList() : List<E>(), mutex(), array() {
+        }
+
+        CopyOnWriteArrayList( const Collection<E>& collection ) : List<E>(),
mutex(), array() {
+            this->doCopyCollection( collection );
         }
 
-        CopyOnWriteArrayList( const Collection<E>& collection ) : List<E>()
{
-            this->copy( collection );
+        CopyOnWriteArrayList( const CopyOnWriteArrayList<E>& collection ) : List<E>(),
mutex(), array() {
+            this->doCopyCollection( collection );
         }
 
-        CopyOnWriteArrayList( const E* array, int size ) : List<E>() {
+        CopyOnWriteArrayList( const E* array, int size ) : List<E>(), mutex(), array()
{
 
             E* elements = new E[size];
             for( int i = 0; i < size; ++i ) {
@@ -132,27 +141,28 @@ namespace concurrent {
 
         virtual ~CopyOnWriteArrayList() {}
 
-    public:  // Collections API
-
-        virtual void copy( const Collection<E>& collection ) {
+    public:
 
-            if( (void*)this == &collection ) {
-                return;
+        CopyOnWriteArrayList<E>& operator= ( const CopyOnWriteArrayList<E>&
list ) {
+            synchronized( &mutex ) {
+                this->clear();
+                this->doCopyCollection( list );
             }
+            return *this;
+        }
 
-            synchronized( &this->mutex ) {
-
-                ArrayPointer<E> data( collection.size() );
-
-                std::auto_ptr< Iterator<E> > iter( collection.iterator() );
-                int index = 0;
+        CopyOnWriteArrayList<E>& operator= ( const Collection<E>& list
) {
+            synchronized( &mutex ) {
+                this->clear();
+                this->doCopyCollection( list );
+            }
+            return *this;
+        }
 
-                while( iter->hasNext() ) {
-                    data[index++] = iter->next();
-                }
+    public:  // Collections API
 
-                this->array = data;
-            }
+        virtual void copy( const Collection<E>& collection ) {
+            this->doCopyCollection( collection );
         }
 
         virtual bool add( const E& value ) {
@@ -738,6 +748,27 @@ namespace concurrent {
         template<typename T>
         friend class CopyOnWriteArraySet;
 
+        void doCopyCollection( const Collection<E>& collection ) {
+
+            if( (void*)this == &collection ) {
+                return;
+            }
+
+            synchronized( &this->mutex ) {
+
+                ArrayPointer<E> data( collection.size() );
+
+                std::auto_ptr< Iterator<E> > iter( collection.iterator() );
+                int index = 0;
+
+                while( iter->hasNext() ) {
+                    data[index++] = iter->next();
+                }
+
+                this->array = data;
+            }
+        }
+
         ArrayPointer<E> getArray() const {
             return this->array;
         }



Mime
View raw message