Author: tabish
Date: Thu Aug 12 20:46:52 2010
New Revision: 984959
URL: http://svn.apache.org/viewvc?rev=984959&view=rev
Log:
Attempt to fix some reports of errors with MapMessage processing
Modified:
activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/util/PrimitiveValueConverter.cpp
activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.cpp
Modified:
activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/util/PrimitiveValueConverter.cpp
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/util/PrimitiveValueConverter.cpp?rev=984959&r1=984958&r2=984959&view=diff
==============================================================================
---
activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/util/PrimitiveValueConverter.cpp
(original)
+++
activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/util/PrimitiveValueConverter.cpp
Thu Aug 12 20:46:52 2010
@@ -217,6 +217,8 @@ std::string PrimitiveValueConverter::con
throw( decaf::lang::exceptions::UnsupportedOperationException ) {
switch( value.getType() ) {
+ case PrimitiveValueNode::NULL_TYPE:
+ return "";
case PrimitiveValueNode::BOOLEAN_TYPE:
return decaf::lang::Boolean::toString( value.getBool() );
case PrimitiveValueNode::BYTE_TYPE:
Modified:
activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.cpp
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.cpp?rev=984959&r1=984958&r2=984959&view=diff
==============================================================================
---
activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.cpp
(original)
+++
activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.cpp
Thu Aug 12 20:46:52 2010
@@ -87,6 +87,7 @@ void MapMessageTest::testMapWithEmptyStr
cms::MapMessage* recvMapMessage = dynamic_cast<MapMessage*>( message.get()
);
CPPUNIT_ASSERT( recvMapMessage != NULL );
CPPUNIT_ASSERT( recvMapMessage->itemExists( "String1" ) == true );
+ CPPUNIT_ASSERT( recvMapMessage->getString( "String1" ) == "" );
CPPUNIT_ASSERT( recvMapMessage->itemExists( "String2" ) == true );
CPPUNIT_ASSERT( recvMapMessage->itemExists( "String3" ) == false );
CPPUNIT_ASSERT( recvMapMessage->getString( "String2" ) == string( "value"
) );