activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r503888 - in /activemq/activemq-cpp/trunk/activemq-cpp: openwire-scripts/ src/main/activemq/connector/openwire/commands/
Date Mon, 05 Feb 2007 21:47:41 GMT
Author: tabish
Date: Mon Feb  5 13:47:38 2007
New Revision: 503888

URL: http://svn.apache.org/viewvc?view=rev&rev=503888
Log:
http://issues.apache.org/activemq/browse/AMQCPP-30

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/openwire-scripts/AmqCppClassesGenerator.java
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/BrokerInfo.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ConnectionError.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ConnectionInfo.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ConsumerControl.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ConsumerInfo.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/DataArrayResponse.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/DataResponse.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/DestinationInfo.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ExceptionResponse.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/JournalQueueAck.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/JournalTopicAck.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/JournalTransaction.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/LocalTransactionId.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/Message.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageAck.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatch.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatchNotification.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageId.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessagePull.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/NetworkBridgeFilter.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ProducerInfo.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveInfo.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveSubscriptionInfo.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SessionInfo.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SubscriptionInfo.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/TransactionInfo.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/openwire-scripts/AmqCppClassesGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/openwire-scripts/AmqCppClassesGenerator.java?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/openwire-scripts/AmqCppClassesGenerator.java (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/openwire-scripts/AmqCppClassesGenerator.java Mon Feb  5 13:47:38 2007
@@ -261,17 +261,23 @@
             String arrayType = property.getType().getArrayComponentType().getSimpleName();
             
     out.println("    for( size_t i" + parameterName + " = 0; i" + parameterName + " < srcPtr->"+getter+"().size(); ++i" + parameterName + " ) {");
-    out.println("        this->"+getter+"().push_back( ");
-    out.println("            dynamic_cast<"+arrayType+"*>( ");
-    out.println("                srcPtr->"+getter+"()[i"+parameterName+"]->cloneDataStructure() ) );");            
+    out.println("        if( srcPtr->"+getter+"()[i"+parameterName+"] != NULL ) {");
+    out.println("            this->"+getter+"().push_back( ");
+    out.println("                dynamic_cast<"+arrayType+"*>( ");
+    out.println("                    srcPtr->"+getter+"()[i"+parameterName+"]->cloneDataStructure() ) );");
+    out.println("        } else {");
+    out.println("            this->"+getter+"().push_back( NULL );");
+    out.println("        }");
     out.println("    }");
         } else if( property.getType().isArrayType() &&
                    property.getType().getArrayComponentType().isPrimitiveType() ) {
     out.println("    this->"+setter+"( srcPtr->"+getter+"() );");
         } else {
-    out.println("    this->"+setter+"( ");
-    out.println("        dynamic_cast<"+type+"*>( ");
-    out.println("            srcPtr->"+getter+"()->cloneDataStructure() ) );");
+    out.println("    if( srcPtr->"+getter+"() != NULL ) {");
+    out.println("        this->"+setter+"( ");
+    out.println("            dynamic_cast<"+type+"*>( ");
+    out.println("                srcPtr->"+getter+"()->cloneDataStructure() ) );");
+    out.println("    }");
         }
     }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/BrokerInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/BrokerInfo.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/BrokerInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/BrokerInfo.cpp Mon Feb  5 13:47:38 2007
@@ -81,14 +81,20 @@
             __FILE__, __LINE__,
             "BrokerInfo::copyDataStructure - src is NULL or invalid" );
     }
-    this->setBrokerId( 
-        dynamic_cast<BrokerId*>( 
-            srcPtr->getBrokerId()->cloneDataStructure() ) );
+    if( srcPtr->getBrokerId() != NULL ) {
+        this->setBrokerId( 
+            dynamic_cast<BrokerId*>( 
+                srcPtr->getBrokerId()->cloneDataStructure() ) );
+    }
     this->setBrokerURL( srcPtr->getBrokerURL() );
     for( size_t ipeerBrokerInfos = 0; ipeerBrokerInfos < srcPtr->getPeerBrokerInfos().size(); ++ipeerBrokerInfos ) {
-        this->getPeerBrokerInfos().push_back( 
-            dynamic_cast<BrokerInfo*>( 
-                srcPtr->getPeerBrokerInfos()[ipeerBrokerInfos]->cloneDataStructure() ) );
+        if( srcPtr->getPeerBrokerInfos()[ipeerBrokerInfos] != NULL ) {
+            this->getPeerBrokerInfos().push_back( 
+                dynamic_cast<BrokerInfo*>( 
+                    srcPtr->getPeerBrokerInfos()[ipeerBrokerInfos]->cloneDataStructure() ) );
+        } else {
+            this->getPeerBrokerInfos().push_back( NULL );
+        }
     }
     this->setBrokerName( srcPtr->getBrokerName() );
     this->setSlaveBroker( srcPtr->isSlaveBroker() );

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ConnectionError.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ConnectionError.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ConnectionError.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ConnectionError.cpp Mon Feb  5 13:47:38 2007
@@ -72,12 +72,16 @@
             __FILE__, __LINE__,
             "ConnectionError::copyDataStructure - src is NULL or invalid" );
     }
-    this->setException( 
-        dynamic_cast<BrokerError*>( 
-            srcPtr->getException()->cloneDataStructure() ) );
-    this->setConnectionId( 
-        dynamic_cast<ConnectionId*>( 
-            srcPtr->getConnectionId()->cloneDataStructure() ) );
+    if( srcPtr->getException() != NULL ) {
+        this->setException( 
+            dynamic_cast<BrokerError*>( 
+                srcPtr->getException()->cloneDataStructure() ) );
+    }
+    if( srcPtr->getConnectionId() != NULL ) {
+        this->setConnectionId( 
+            dynamic_cast<ConnectionId*>( 
+                srcPtr->getConnectionId()->cloneDataStructure() ) );
+    }
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ConnectionInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ConnectionInfo.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ConnectionInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ConnectionInfo.cpp Mon Feb  5 13:47:38 2007
@@ -79,16 +79,22 @@
             __FILE__, __LINE__,
             "ConnectionInfo::copyDataStructure - src is NULL or invalid" );
     }
-    this->setConnectionId( 
-        dynamic_cast<ConnectionId*>( 
-            srcPtr->getConnectionId()->cloneDataStructure() ) );
+    if( srcPtr->getConnectionId() != NULL ) {
+        this->setConnectionId( 
+            dynamic_cast<ConnectionId*>( 
+                srcPtr->getConnectionId()->cloneDataStructure() ) );
+    }
     this->setClientId( srcPtr->getClientId() );
     this->setPassword( srcPtr->getPassword() );
     this->setUserName( srcPtr->getUserName() );
     for( size_t ibrokerPath = 0; ibrokerPath < srcPtr->getBrokerPath().size(); ++ibrokerPath ) {
-        this->getBrokerPath().push_back( 
-            dynamic_cast<BrokerId*>( 
-                srcPtr->getBrokerPath()[ibrokerPath]->cloneDataStructure() ) );
+        if( srcPtr->getBrokerPath()[ibrokerPath] != NULL ) {
+            this->getBrokerPath().push_back( 
+                dynamic_cast<BrokerId*>( 
+                    srcPtr->getBrokerPath()[ibrokerPath]->cloneDataStructure() ) );
+        } else {
+            this->getBrokerPath().push_back( NULL );
+        }
     }
     this->setBrokerMasterConnector( srcPtr->isBrokerMasterConnector() );
     this->setManageable( srcPtr->isManageable() );

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ConsumerControl.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ConsumerControl.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ConsumerControl.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ConsumerControl.cpp Mon Feb  5 13:47:38 2007
@@ -76,9 +76,11 @@
             "ConsumerControl::copyDataStructure - src is NULL or invalid" );
     }
     this->setClose( srcPtr->isClose() );
-    this->setConsumerId( 
-        dynamic_cast<ConsumerId*>( 
-            srcPtr->getConsumerId()->cloneDataStructure() ) );
+    if( srcPtr->getConsumerId() != NULL ) {
+        this->setConsumerId( 
+            dynamic_cast<ConsumerId*>( 
+                srcPtr->getConsumerId()->cloneDataStructure() ) );
+    }
     this->setPrefetch( srcPtr->getPrefetch() );
     this->setFlush( srcPtr->isFlush() );
     this->setStart( srcPtr->isStart() );

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ConsumerInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ConsumerInfo.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ConsumerInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ConsumerInfo.cpp Mon Feb  5 13:47:38 2007
@@ -90,13 +90,17 @@
             __FILE__, __LINE__,
             "ConsumerInfo::copyDataStructure - src is NULL or invalid" );
     }
-    this->setConsumerId( 
-        dynamic_cast<ConsumerId*>( 
-            srcPtr->getConsumerId()->cloneDataStructure() ) );
+    if( srcPtr->getConsumerId() != NULL ) {
+        this->setConsumerId( 
+            dynamic_cast<ConsumerId*>( 
+                srcPtr->getConsumerId()->cloneDataStructure() ) );
+    }
     this->setBrowser( srcPtr->isBrowser() );
-    this->setDestination( 
-        dynamic_cast<ActiveMQDestination*>( 
-            srcPtr->getDestination()->cloneDataStructure() ) );
+    if( srcPtr->getDestination() != NULL ) {
+        this->setDestination( 
+            dynamic_cast<ActiveMQDestination*>( 
+                srcPtr->getDestination()->cloneDataStructure() ) );
+    }
     this->setPrefetchSize( srcPtr->getPrefetchSize() );
     this->setMaximumPendingMessageLimit( srcPtr->getMaximumPendingMessageLimit() );
     this->setDispatchAsync( srcPtr->isDispatchAsync() );
@@ -107,13 +111,19 @@
     this->setRetroactive( srcPtr->isRetroactive() );
     this->setPriority( srcPtr->getPriority() );
     for( size_t ibrokerPath = 0; ibrokerPath < srcPtr->getBrokerPath().size(); ++ibrokerPath ) {
-        this->getBrokerPath().push_back( 
-            dynamic_cast<BrokerId*>( 
-                srcPtr->getBrokerPath()[ibrokerPath]->cloneDataStructure() ) );
+        if( srcPtr->getBrokerPath()[ibrokerPath] != NULL ) {
+            this->getBrokerPath().push_back( 
+                dynamic_cast<BrokerId*>( 
+                    srcPtr->getBrokerPath()[ibrokerPath]->cloneDataStructure() ) );
+        } else {
+            this->getBrokerPath().push_back( NULL );
+        }
+    }
+    if( srcPtr->getAdditionalPredicate() != NULL ) {
+        this->setAdditionalPredicate( 
+            dynamic_cast<BooleanExpression*>( 
+                srcPtr->getAdditionalPredicate()->cloneDataStructure() ) );
     }
-    this->setAdditionalPredicate( 
-        dynamic_cast<BooleanExpression*>( 
-            srcPtr->getAdditionalPredicate()->cloneDataStructure() ) );
     this->setNetworkSubscription( srcPtr->isNetworkSubscription() );
     this->setOptimizedAcknowledge( srcPtr->isOptimizedAcknowledge() );
     this->setNoRangeAcks( srcPtr->isNoRangeAcks() );

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/DataArrayResponse.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/DataArrayResponse.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/DataArrayResponse.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/DataArrayResponse.cpp Mon Feb  5 13:47:38 2007
@@ -72,9 +72,13 @@
             "DataArrayResponse::copyDataStructure - src is NULL or invalid" );
     }
     for( size_t idata = 0; idata < srcPtr->getData().size(); ++idata ) {
-        this->getData().push_back( 
-            dynamic_cast<DataStructure*>( 
-                srcPtr->getData()[idata]->cloneDataStructure() ) );
+        if( srcPtr->getData()[idata] != NULL ) {
+            this->getData().push_back( 
+                dynamic_cast<DataStructure*>( 
+                    srcPtr->getData()[idata]->cloneDataStructure() ) );
+        } else {
+            this->getData().push_back( NULL );
+        }
     }
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/DataResponse.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/DataResponse.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/DataResponse.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/DataResponse.cpp Mon Feb  5 13:47:38 2007
@@ -70,9 +70,11 @@
             __FILE__, __LINE__,
             "DataResponse::copyDataStructure - src is NULL or invalid" );
     }
-    this->setData( 
-        dynamic_cast<DataStructure*>( 
-            srcPtr->getData()->cloneDataStructure() ) );
+    if( srcPtr->getData() != NULL ) {
+        this->setData( 
+            dynamic_cast<DataStructure*>( 
+                srcPtr->getData()->cloneDataStructure() ) );
+    }
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/DestinationInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/DestinationInfo.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/DestinationInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/DestinationInfo.cpp Mon Feb  5 13:47:38 2007
@@ -77,18 +77,26 @@
             __FILE__, __LINE__,
             "DestinationInfo::copyDataStructure - src is NULL or invalid" );
     }
-    this->setConnectionId( 
-        dynamic_cast<ConnectionId*>( 
-            srcPtr->getConnectionId()->cloneDataStructure() ) );
-    this->setDestination( 
-        dynamic_cast<ActiveMQDestination*>( 
-            srcPtr->getDestination()->cloneDataStructure() ) );
+    if( srcPtr->getConnectionId() != NULL ) {
+        this->setConnectionId( 
+            dynamic_cast<ConnectionId*>( 
+                srcPtr->getConnectionId()->cloneDataStructure() ) );
+    }
+    if( srcPtr->getDestination() != NULL ) {
+        this->setDestination( 
+            dynamic_cast<ActiveMQDestination*>( 
+                srcPtr->getDestination()->cloneDataStructure() ) );
+    }
     this->setOperationType( srcPtr->getOperationType() );
     this->setTimeout( srcPtr->getTimeout() );
     for( size_t ibrokerPath = 0; ibrokerPath < srcPtr->getBrokerPath().size(); ++ibrokerPath ) {
-        this->getBrokerPath().push_back( 
-            dynamic_cast<BrokerId*>( 
-                srcPtr->getBrokerPath()[ibrokerPath]->cloneDataStructure() ) );
+        if( srcPtr->getBrokerPath()[ibrokerPath] != NULL ) {
+            this->getBrokerPath().push_back( 
+                dynamic_cast<BrokerId*>( 
+                    srcPtr->getBrokerPath()[ibrokerPath]->cloneDataStructure() ) );
+        } else {
+            this->getBrokerPath().push_back( NULL );
+        }
     }
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ExceptionResponse.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ExceptionResponse.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ExceptionResponse.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ExceptionResponse.cpp Mon Feb  5 13:47:38 2007
@@ -70,9 +70,11 @@
             __FILE__, __LINE__,
             "ExceptionResponse::copyDataStructure - src is NULL or invalid" );
     }
-    this->setException( 
-        dynamic_cast<BrokerError*>( 
-            srcPtr->getException()->cloneDataStructure() ) );
+    if( srcPtr->getException() != NULL ) {
+        this->setException( 
+            dynamic_cast<BrokerError*>( 
+                srcPtr->getException()->cloneDataStructure() ) );
+    }
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/JournalQueueAck.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/JournalQueueAck.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/JournalQueueAck.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/JournalQueueAck.cpp Mon Feb  5 13:47:38 2007
@@ -72,12 +72,16 @@
             __FILE__, __LINE__,
             "JournalQueueAck::copyDataStructure - src is NULL or invalid" );
     }
-    this->setDestination( 
-        dynamic_cast<ActiveMQDestination*>( 
-            srcPtr->getDestination()->cloneDataStructure() ) );
-    this->setMessageAck( 
-        dynamic_cast<MessageAck*>( 
-            srcPtr->getMessageAck()->cloneDataStructure() ) );
+    if( srcPtr->getDestination() != NULL ) {
+        this->setDestination( 
+            dynamic_cast<ActiveMQDestination*>( 
+                srcPtr->getDestination()->cloneDataStructure() ) );
+    }
+    if( srcPtr->getMessageAck() != NULL ) {
+        this->setMessageAck( 
+            dynamic_cast<MessageAck*>( 
+                srcPtr->getMessageAck()->cloneDataStructure() ) );
+    }
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/JournalTopicAck.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/JournalTopicAck.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/JournalTopicAck.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/JournalTopicAck.cpp Mon Feb  5 13:47:38 2007
@@ -77,18 +77,24 @@
             __FILE__, __LINE__,
             "JournalTopicAck::copyDataStructure - src is NULL or invalid" );
     }
-    this->setDestination( 
-        dynamic_cast<ActiveMQDestination*>( 
-            srcPtr->getDestination()->cloneDataStructure() ) );
-    this->setMessageId( 
-        dynamic_cast<MessageId*>( 
-            srcPtr->getMessageId()->cloneDataStructure() ) );
+    if( srcPtr->getDestination() != NULL ) {
+        this->setDestination( 
+            dynamic_cast<ActiveMQDestination*>( 
+                srcPtr->getDestination()->cloneDataStructure() ) );
+    }
+    if( srcPtr->getMessageId() != NULL ) {
+        this->setMessageId( 
+            dynamic_cast<MessageId*>( 
+                srcPtr->getMessageId()->cloneDataStructure() ) );
+    }
     this->setMessageSequenceId( srcPtr->getMessageSequenceId() );
     this->setSubscritionName( srcPtr->getSubscritionName() );
     this->setClientId( srcPtr->getClientId() );
-    this->setTransactionId( 
-        dynamic_cast<TransactionId*>( 
-            srcPtr->getTransactionId()->cloneDataStructure() ) );
+    if( srcPtr->getTransactionId() != NULL ) {
+        this->setTransactionId( 
+            dynamic_cast<TransactionId*>( 
+                srcPtr->getTransactionId()->cloneDataStructure() ) );
+    }
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/JournalTransaction.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/JournalTransaction.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/JournalTransaction.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/JournalTransaction.cpp Mon Feb  5 13:47:38 2007
@@ -72,9 +72,11 @@
             __FILE__, __LINE__,
             "JournalTransaction::copyDataStructure - src is NULL or invalid" );
     }
-    this->setTransactionId( 
-        dynamic_cast<TransactionId*>( 
-            srcPtr->getTransactionId()->cloneDataStructure() ) );
+    if( srcPtr->getTransactionId() != NULL ) {
+        this->setTransactionId( 
+            dynamic_cast<TransactionId*>( 
+                srcPtr->getTransactionId()->cloneDataStructure() ) );
+    }
     this->setType( srcPtr->getType() );
     this->setWasPrepared( srcPtr->getWasPrepared() );
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/LocalTransactionId.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/LocalTransactionId.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/LocalTransactionId.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/LocalTransactionId.cpp Mon Feb  5 13:47:38 2007
@@ -72,9 +72,11 @@
             "LocalTransactionId::copyDataStructure - src is NULL or invalid" );
     }
     this->setValue( srcPtr->getValue() );
-    this->setConnectionId( 
-        dynamic_cast<ConnectionId*>( 
-            srcPtr->getConnectionId()->cloneDataStructure() ) );
+    if( srcPtr->getConnectionId() != NULL ) {
+        this->setConnectionId( 
+            dynamic_cast<ConnectionId*>( 
+                srcPtr->getConnectionId()->cloneDataStructure() ) );
+    }
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/Message.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/Message.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/Message.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/Message.cpp Mon Feb  5 13:47:38 2007
@@ -103,49 +103,71 @@
             __FILE__, __LINE__,
             "Message::copyDataStructure - src is NULL or invalid" );
     }
-    this->setProducerId( 
-        dynamic_cast<ProducerId*>( 
-            srcPtr->getProducerId()->cloneDataStructure() ) );
-    this->setDestination( 
-        dynamic_cast<ActiveMQDestination*>( 
-            srcPtr->getDestination()->cloneDataStructure() ) );
-    this->setTransactionId( 
-        dynamic_cast<TransactionId*>( 
-            srcPtr->getTransactionId()->cloneDataStructure() ) );
-    this->setOriginalDestination( 
-        dynamic_cast<ActiveMQDestination*>( 
-            srcPtr->getOriginalDestination()->cloneDataStructure() ) );
-    this->setMessageId( 
-        dynamic_cast<MessageId*>( 
-            srcPtr->getMessageId()->cloneDataStructure() ) );
-    this->setOriginalTransactionId( 
-        dynamic_cast<TransactionId*>( 
-            srcPtr->getOriginalTransactionId()->cloneDataStructure() ) );
+    if( srcPtr->getProducerId() != NULL ) {
+        this->setProducerId( 
+            dynamic_cast<ProducerId*>( 
+                srcPtr->getProducerId()->cloneDataStructure() ) );
+    }
+    if( srcPtr->getDestination() != NULL ) {
+        this->setDestination( 
+            dynamic_cast<ActiveMQDestination*>( 
+                srcPtr->getDestination()->cloneDataStructure() ) );
+    }
+    if( srcPtr->getTransactionId() != NULL ) {
+        this->setTransactionId( 
+            dynamic_cast<TransactionId*>( 
+                srcPtr->getTransactionId()->cloneDataStructure() ) );
+    }
+    if( srcPtr->getOriginalDestination() != NULL ) {
+        this->setOriginalDestination( 
+            dynamic_cast<ActiveMQDestination*>( 
+                srcPtr->getOriginalDestination()->cloneDataStructure() ) );
+    }
+    if( srcPtr->getMessageId() != NULL ) {
+        this->setMessageId( 
+            dynamic_cast<MessageId*>( 
+                srcPtr->getMessageId()->cloneDataStructure() ) );
+    }
+    if( srcPtr->getOriginalTransactionId() != NULL ) {
+        this->setOriginalTransactionId( 
+            dynamic_cast<TransactionId*>( 
+                srcPtr->getOriginalTransactionId()->cloneDataStructure() ) );
+    }
     this->setGroupID( srcPtr->getGroupID() );
     this->setGroupSequence( srcPtr->getGroupSequence() );
     this->setCorrelationId( srcPtr->getCorrelationId() );
     this->setPersistent( srcPtr->isPersistent() );
     this->setExpiration( srcPtr->getExpiration() );
     this->setPriority( srcPtr->getPriority() );
-    this->setReplyTo( 
-        dynamic_cast<ActiveMQDestination*>( 
-            srcPtr->getReplyTo()->cloneDataStructure() ) );
+    if( srcPtr->getReplyTo() != NULL ) {
+        this->setReplyTo( 
+            dynamic_cast<ActiveMQDestination*>( 
+                srcPtr->getReplyTo()->cloneDataStructure() ) );
+    }
     this->setTimestamp( srcPtr->getTimestamp() );
     this->setType( srcPtr->getType() );
     this->setContent( srcPtr->getContent() );
     this->setMarshalledProperties( srcPtr->getMarshalledProperties() );
-    this->setDataStructure( 
-        dynamic_cast<DataStructure*>( 
-            srcPtr->getDataStructure()->cloneDataStructure() ) );
-    this->setTargetConsumerId( 
-        dynamic_cast<ConsumerId*>( 
-            srcPtr->getTargetConsumerId()->cloneDataStructure() ) );
+    if( srcPtr->getDataStructure() != NULL ) {
+        this->setDataStructure( 
+            dynamic_cast<DataStructure*>( 
+                srcPtr->getDataStructure()->cloneDataStructure() ) );
+    }
+    if( srcPtr->getTargetConsumerId() != NULL ) {
+        this->setTargetConsumerId( 
+            dynamic_cast<ConsumerId*>( 
+                srcPtr->getTargetConsumerId()->cloneDataStructure() ) );
+    }
     this->setCompressed( srcPtr->isCompressed() );
     this->setRedeliveryCounter( srcPtr->getRedeliveryCounter() );
     for( size_t ibrokerPath = 0; ibrokerPath < srcPtr->getBrokerPath().size(); ++ibrokerPath ) {
-        this->getBrokerPath().push_back( 
-            dynamic_cast<BrokerId*>( 
-                srcPtr->getBrokerPath()[ibrokerPath]->cloneDataStructure() ) );
+        if( srcPtr->getBrokerPath()[ibrokerPath] != NULL ) {
+            this->getBrokerPath().push_back( 
+                dynamic_cast<BrokerId*>( 
+                    srcPtr->getBrokerPath()[ibrokerPath]->cloneDataStructure() ) );
+        } else {
+            this->getBrokerPath().push_back( NULL );
+        }
     }
     this->setArrival( srcPtr->getArrival() );
     this->setUserID( srcPtr->getUserID() );

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageAck.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageAck.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageAck.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageAck.cpp Mon Feb  5 13:47:38 2007
@@ -80,22 +80,32 @@
             __FILE__, __LINE__,
             "MessageAck::copyDataStructure - src is NULL or invalid" );
     }
-    this->setDestination( 
-        dynamic_cast<ActiveMQDestination*>( 
-            srcPtr->getDestination()->cloneDataStructure() ) );
-    this->setTransactionId( 
-        dynamic_cast<TransactionId*>( 
-            srcPtr->getTransactionId()->cloneDataStructure() ) );
-    this->setConsumerId( 
-        dynamic_cast<ConsumerId*>( 
-            srcPtr->getConsumerId()->cloneDataStructure() ) );
+    if( srcPtr->getDestination() != NULL ) {
+        this->setDestination( 
+            dynamic_cast<ActiveMQDestination*>( 
+                srcPtr->getDestination()->cloneDataStructure() ) );
+    }
+    if( srcPtr->getTransactionId() != NULL ) {
+        this->setTransactionId( 
+            dynamic_cast<TransactionId*>( 
+                srcPtr->getTransactionId()->cloneDataStructure() ) );
+    }
+    if( srcPtr->getConsumerId() != NULL ) {
+        this->setConsumerId( 
+            dynamic_cast<ConsumerId*>( 
+                srcPtr->getConsumerId()->cloneDataStructure() ) );
+    }
     this->setAckType( srcPtr->getAckType() );
-    this->setFirstMessageId( 
-        dynamic_cast<MessageId*>( 
-            srcPtr->getFirstMessageId()->cloneDataStructure() ) );
-    this->setLastMessageId( 
-        dynamic_cast<MessageId*>( 
-            srcPtr->getLastMessageId()->cloneDataStructure() ) );
+    if( srcPtr->getFirstMessageId() != NULL ) {
+        this->setFirstMessageId( 
+            dynamic_cast<MessageId*>( 
+                srcPtr->getFirstMessageId()->cloneDataStructure() ) );
+    }
+    if( srcPtr->getLastMessageId() != NULL ) {
+        this->setLastMessageId( 
+            dynamic_cast<MessageId*>( 
+                srcPtr->getLastMessageId()->cloneDataStructure() ) );
+    }
     this->setMessageCount( srcPtr->getMessageCount() );
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatch.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatch.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatch.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatch.cpp Mon Feb  5 13:47:38 2007
@@ -75,15 +75,21 @@
             __FILE__, __LINE__,
             "MessageDispatch::copyDataStructure - src is NULL or invalid" );
     }
-    this->setConsumerId( 
-        dynamic_cast<ConsumerId*>( 
-            srcPtr->getConsumerId()->cloneDataStructure() ) );
-    this->setDestination( 
-        dynamic_cast<ActiveMQDestination*>( 
-            srcPtr->getDestination()->cloneDataStructure() ) );
-    this->setMessage( 
-        dynamic_cast<Message*>( 
-            srcPtr->getMessage()->cloneDataStructure() ) );
+    if( srcPtr->getConsumerId() != NULL ) {
+        this->setConsumerId( 
+            dynamic_cast<ConsumerId*>( 
+                srcPtr->getConsumerId()->cloneDataStructure() ) );
+    }
+    if( srcPtr->getDestination() != NULL ) {
+        this->setDestination( 
+            dynamic_cast<ActiveMQDestination*>( 
+                srcPtr->getDestination()->cloneDataStructure() ) );
+    }
+    if( srcPtr->getMessage() != NULL ) {
+        this->setMessage( 
+            dynamic_cast<Message*>( 
+                srcPtr->getMessage()->cloneDataStructure() ) );
+    }
     this->setRedeliveryCounter( srcPtr->getRedeliveryCounter() );
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatchNotification.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatchNotification.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatchNotification.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageDispatchNotification.cpp Mon Feb  5 13:47:38 2007
@@ -75,16 +75,22 @@
             __FILE__, __LINE__,
             "MessageDispatchNotification::copyDataStructure - src is NULL or invalid" );
     }
-    this->setConsumerId( 
-        dynamic_cast<ConsumerId*>( 
-            srcPtr->getConsumerId()->cloneDataStructure() ) );
-    this->setDestination( 
-        dynamic_cast<ActiveMQDestination*>( 
-            srcPtr->getDestination()->cloneDataStructure() ) );
+    if( srcPtr->getConsumerId() != NULL ) {
+        this->setConsumerId( 
+            dynamic_cast<ConsumerId*>( 
+                srcPtr->getConsumerId()->cloneDataStructure() ) );
+    }
+    if( srcPtr->getDestination() != NULL ) {
+        this->setDestination( 
+            dynamic_cast<ActiveMQDestination*>( 
+                srcPtr->getDestination()->cloneDataStructure() ) );
+    }
     this->setDeliverySequenceId( srcPtr->getDeliverySequenceId() );
-    this->setMessageId( 
-        dynamic_cast<MessageId*>( 
-            srcPtr->getMessageId()->cloneDataStructure() ) );
+    if( srcPtr->getMessageId() != NULL ) {
+        this->setMessageId( 
+            dynamic_cast<MessageId*>( 
+                srcPtr->getMessageId()->cloneDataStructure() ) );
+    }
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageId.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageId.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageId.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessageId.cpp Mon Feb  5 13:47:38 2007
@@ -72,9 +72,11 @@
             __FILE__, __LINE__,
             "MessageId::copyDataStructure - src is NULL or invalid" );
     }
-    this->setProducerId( 
-        dynamic_cast<ProducerId*>( 
-            srcPtr->getProducerId()->cloneDataStructure() ) );
+    if( srcPtr->getProducerId() != NULL ) {
+        this->setProducerId( 
+            dynamic_cast<ProducerId*>( 
+                srcPtr->getProducerId()->cloneDataStructure() ) );
+    }
     this->setProducerSequenceId( srcPtr->getProducerSequenceId() );
     this->setBrokerSequenceId( srcPtr->getBrokerSequenceId() );
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessagePull.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessagePull.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessagePull.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/MessagePull.cpp Mon Feb  5 13:47:38 2007
@@ -73,12 +73,16 @@
             __FILE__, __LINE__,
             "MessagePull::copyDataStructure - src is NULL or invalid" );
     }
-    this->setConsumerId( 
-        dynamic_cast<ConsumerId*>( 
-            srcPtr->getConsumerId()->cloneDataStructure() ) );
-    this->setDestination( 
-        dynamic_cast<ActiveMQDestination*>( 
-            srcPtr->getDestination()->cloneDataStructure() ) );
+    if( srcPtr->getConsumerId() != NULL ) {
+        this->setConsumerId( 
+            dynamic_cast<ConsumerId*>( 
+                srcPtr->getConsumerId()->cloneDataStructure() ) );
+    }
+    if( srcPtr->getDestination() != NULL ) {
+        this->setDestination( 
+            dynamic_cast<ActiveMQDestination*>( 
+                srcPtr->getDestination()->cloneDataStructure() ) );
+    }
     this->setTimeout( srcPtr->getTimeout() );
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/NetworkBridgeFilter.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/NetworkBridgeFilter.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/NetworkBridgeFilter.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/NetworkBridgeFilter.cpp Mon Feb  5 13:47:38 2007
@@ -72,9 +72,11 @@
             "NetworkBridgeFilter::copyDataStructure - src is NULL or invalid" );
     }
     this->setNetworkTTL( srcPtr->getNetworkTTL() );
-    this->setNetworkBrokerId( 
-        dynamic_cast<BrokerId*>( 
-            srcPtr->getNetworkBrokerId()->cloneDataStructure() ) );
+    if( srcPtr->getNetworkBrokerId() != NULL ) {
+        this->setNetworkBrokerId( 
+            dynamic_cast<BrokerId*>( 
+                srcPtr->getNetworkBrokerId()->cloneDataStructure() ) );
+    }
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ProducerInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ProducerInfo.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ProducerInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ProducerInfo.cpp Mon Feb  5 13:47:38 2007
@@ -76,16 +76,24 @@
             __FILE__, __LINE__,
             "ProducerInfo::copyDataStructure - src is NULL or invalid" );
     }
-    this->setProducerId( 
-        dynamic_cast<ProducerId*>( 
-            srcPtr->getProducerId()->cloneDataStructure() ) );
-    this->setDestination( 
-        dynamic_cast<ActiveMQDestination*>( 
-            srcPtr->getDestination()->cloneDataStructure() ) );
+    if( srcPtr->getProducerId() != NULL ) {
+        this->setProducerId( 
+            dynamic_cast<ProducerId*>( 
+                srcPtr->getProducerId()->cloneDataStructure() ) );
+    }
+    if( srcPtr->getDestination() != NULL ) {
+        this->setDestination( 
+            dynamic_cast<ActiveMQDestination*>( 
+                srcPtr->getDestination()->cloneDataStructure() ) );
+    }
     for( size_t ibrokerPath = 0; ibrokerPath < srcPtr->getBrokerPath().size(); ++ibrokerPath ) {
-        this->getBrokerPath().push_back( 
-            dynamic_cast<BrokerId*>( 
-                srcPtr->getBrokerPath()[ibrokerPath]->cloneDataStructure() ) );
+        if( srcPtr->getBrokerPath()[ibrokerPath] != NULL ) {
+            this->getBrokerPath().push_back( 
+                dynamic_cast<BrokerId*>( 
+                    srcPtr->getBrokerPath()[ibrokerPath]->cloneDataStructure() ) );
+        } else {
+            this->getBrokerPath().push_back( NULL );
+        }
     }
     this->setDispatchAsync( srcPtr->isDispatchAsync() );
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveInfo.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveInfo.cpp Mon Feb  5 13:47:38 2007
@@ -70,9 +70,11 @@
             __FILE__, __LINE__,
             "RemoveInfo::copyDataStructure - src is NULL or invalid" );
     }
-    this->setObjectId( 
-        dynamic_cast<DataStructure*>( 
-            srcPtr->getObjectId()->cloneDataStructure() ) );
+    if( srcPtr->getObjectId() != NULL ) {
+        this->setObjectId( 
+            dynamic_cast<DataStructure*>( 
+                srcPtr->getObjectId()->cloneDataStructure() ) );
+    }
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveSubscriptionInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveSubscriptionInfo.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveSubscriptionInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/RemoveSubscriptionInfo.cpp Mon Feb  5 13:47:38 2007
@@ -72,9 +72,11 @@
             __FILE__, __LINE__,
             "RemoveSubscriptionInfo::copyDataStructure - src is NULL or invalid" );
     }
-    this->setConnectionId( 
-        dynamic_cast<ConnectionId*>( 
-            srcPtr->getConnectionId()->cloneDataStructure() ) );
+    if( srcPtr->getConnectionId() != NULL ) {
+        this->setConnectionId( 
+            dynamic_cast<ConnectionId*>( 
+                srcPtr->getConnectionId()->cloneDataStructure() ) );
+    }
     this->setSubcriptionName( srcPtr->getSubcriptionName() );
     this->setClientId( srcPtr->getClientId() );
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SessionInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SessionInfo.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SessionInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SessionInfo.cpp Mon Feb  5 13:47:38 2007
@@ -70,9 +70,11 @@
             __FILE__, __LINE__,
             "SessionInfo::copyDataStructure - src is NULL or invalid" );
     }
-    this->setSessionId( 
-        dynamic_cast<SessionId*>( 
-            srcPtr->getSessionId()->cloneDataStructure() ) );
+    if( srcPtr->getSessionId() != NULL ) {
+        this->setSessionId( 
+            dynamic_cast<SessionId*>( 
+                srcPtr->getSessionId()->cloneDataStructure() ) );
+    }
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SubscriptionInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SubscriptionInfo.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SubscriptionInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/SubscriptionInfo.cpp Mon Feb  5 13:47:38 2007
@@ -74,9 +74,11 @@
             "SubscriptionInfo::copyDataStructure - src is NULL or invalid" );
     }
     this->setClientId( srcPtr->getClientId() );
-    this->setDestination( 
-        dynamic_cast<ActiveMQDestination*>( 
-            srcPtr->getDestination()->cloneDataStructure() ) );
+    if( srcPtr->getDestination() != NULL ) {
+        this->setDestination( 
+            dynamic_cast<ActiveMQDestination*>( 
+                srcPtr->getDestination()->cloneDataStructure() ) );
+    }
     this->setSelector( srcPtr->getSelector() );
     this->setSubcriptionName( srcPtr->getSubcriptionName() );
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/TransactionInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/TransactionInfo.cpp?view=diff&rev=503888&r1=503887&r2=503888
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/TransactionInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/TransactionInfo.cpp Mon Feb  5 13:47:38 2007
@@ -73,12 +73,16 @@
             __FILE__, __LINE__,
             "TransactionInfo::copyDataStructure - src is NULL or invalid" );
     }
-    this->setConnectionId( 
-        dynamic_cast<ConnectionId*>( 
-            srcPtr->getConnectionId()->cloneDataStructure() ) );
-    this->setTransactionId( 
-        dynamic_cast<TransactionId*>( 
-            srcPtr->getTransactionId()->cloneDataStructure() ) );
+    if( srcPtr->getConnectionId() != NULL ) {
+        this->setConnectionId( 
+            dynamic_cast<ConnectionId*>( 
+                srcPtr->getConnectionId()->cloneDataStructure() ) );
+    }
+    if( srcPtr->getTransactionId() != NULL ) {
+        this->setTransactionId( 
+            dynamic_cast<TransactionId*>( 
+                srcPtr->getTransactionId()->cloneDataStructure() ) );
+    }
     this->setType( srcPtr->getType() );
 }
 



Mime
View raw message