activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1378986 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands: ActiveMQBlobMessage.h ActiveMQBytesMessage.h ActiveMQMapMessage.h ActiveMQMessage.h ActiveMQObjectMessage.h ActiveMQStreamMessage.h ActiveMQTextMessage.h
Date Thu, 30 Aug 2012 15:23:09 GMT
Author: tabish
Date: Thu Aug 30 15:23:08 2012
New Revision: 1378986

URL: http://svn.apache.org/viewvc?rev=1378986&view=rev
Log:
fix for: https://issues.apache.org/jira/browse/AMQCPP-424

clone method of cms::Message should return a clone that's not in read-only mode.  

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBlobMessage.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMessage.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQObjectMessage.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.h

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBlobMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBlobMessage.h?rev=1378986&r1=1378985&r2=1378986&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBlobMessage.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBlobMessage.h
Thu Aug 30 15:23:08 2012
@@ -70,7 +70,10 @@ namespace commands {
     public:  // cms::Message
 
         virtual cms::Message* clone() const {
-            return dynamic_cast<cms::Message*>( this->cloneDataStructure() );
+            ActiveMQBlobMessage* clone = this->cloneDataStructure();
+            clone->setReadOnlyBody(false);
+            clone->setReadOnlyProperties(false);
+            return dynamic_cast<cms::Message*>(clone);
         }
 
     public: // BlobMessage

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.h?rev=1378986&r1=1378985&r2=1378986&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.h
Thu Aug 30 15:23:08 2012
@@ -89,7 +89,10 @@ namespace commands{
     public:   // CMS Message
 
         virtual cms::BytesMessage* clone() const {
-            return dynamic_cast<cms::BytesMessage*>( this->cloneDataStructure()
);
+            ActiveMQBytesMessage* clone = this->cloneDataStructure();
+            clone->setReadOnlyBody(false);
+            clone->setReadOnlyProperties(false);
+            return dynamic_cast<cms::BytesMessage*>(clone);
         }
 
         virtual void clearBody();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.h?rev=1378986&r1=1378985&r2=1378986&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.h
Thu Aug 30 15:23:08 2012
@@ -79,7 +79,10 @@ namespace commands{
     public:   // CMS Message
 
         virtual cms::MapMessage* clone() const {
-            return dynamic_cast<cms::MapMessage*>( this->cloneDataStructure() );
+            ActiveMQMapMessage* clone = this->cloneDataStructure();
+            clone->setReadOnlyBody(false);
+            clone->setReadOnlyProperties(false);
+            return dynamic_cast<cms::MapMessage*>(clone);
         }
 
     public:   // CMS MapMessage

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMessage.h?rev=1378986&r1=1378985&r2=1378986&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMessage.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMessage.h
Thu Aug 30 15:23:08 2012
@@ -61,7 +61,10 @@ namespace commands{
     public:  // cms::Message
 
         virtual cms::Message* clone() const {
-            return dynamic_cast<cms::Message*>( this->cloneDataStructure() );
+            ActiveMQMessage* clone = this->cloneDataStructure();
+            clone->setReadOnlyBody(false);
+            clone->setReadOnlyProperties(false);
+            return dynamic_cast<cms::Message*>(clone);
         }
 
     };

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQObjectMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQObjectMessage.h?rev=1378986&r1=1378985&r2=1378986&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQObjectMessage.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQObjectMessage.h
Thu Aug 30 15:23:08 2012
@@ -63,7 +63,10 @@ namespace commands{
     public: // cms::Message
 
         virtual cms::Message* clone() const {
-            return dynamic_cast<cms::Message*> (this->cloneDataStructure());
+            ActiveMQObjectMessage* clone = this->cloneDataStructure();
+            clone->setReadOnlyBody(false);
+            clone->setReadOnlyProperties(false);
+            return dynamic_cast<cms::Message*>(clone);
         }
 
     public: // cms::ObjectMessage

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.h?rev=1378986&r1=1378985&r2=1378986&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.h
Thu Aug 30 15:23:08 2012
@@ -79,7 +79,10 @@ namespace commands {
     public: // CMS Message
 
         virtual cms::StreamMessage* clone() const {
-            return dynamic_cast<cms::StreamMessage*> (this->cloneDataStructure());
+            ActiveMQStreamMessage* clone = this->cloneDataStructure();
+            clone->setReadOnlyBody(false);
+            clone->setReadOnlyProperties(false);
+            return dynamic_cast<cms::StreamMessage*>(clone);
         }
 
         virtual void clearBody();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.h?rev=1378986&r1=1378985&r2=1378986&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.h
Thu Aug 30 15:23:08 2012
@@ -70,7 +70,10 @@ namespace commands{
     public:   // CMS Message
 
         virtual cms::TextMessage* clone() const {
-            return dynamic_cast<cms::TextMessage*>( this->cloneDataStructure() );
+            ActiveMQTextMessage* clone = this->cloneDataStructure();
+            clone->setReadOnlyBody(false);
+            clone->setReadOnlyProperties(false);
+            return dynamic_cast<cms::TextMessage*>(clone);
         }
 
     public:   // cms::TextMessage



Mime
View raw message