You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2009/04/16 20:50:59 UTC
svn commit: r765718 - in
/activemq/activemq-cpp/branches/activemq-cpp-2.x/src:
main/decaf/io/DataOutputStream.cpp
test/activemq/connector/openwire/utils/OpenwireStringSupportTest.cpp
Author: tabish
Date: Thu Apr 16 18:50:59 2009
New Revision: 765718
URL: http://svn.apache.org/viewvc?rev=765718&view=rev
Log:
Fix an uninitialized variable in the tests, gets rid of a warning on the windows build. Fix an error with the unit tests on Windows.
Modified:
activemq/activemq-cpp/branches/activemq-cpp-2.x/src/main/decaf/io/DataOutputStream.cpp
activemq/activemq-cpp/branches/activemq-cpp-2.x/src/test/activemq/connector/openwire/utils/OpenwireStringSupportTest.cpp
Modified: activemq/activemq-cpp/branches/activemq-cpp-2.x/src/main/decaf/io/DataOutputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-2.x/src/main/decaf/io/DataOutputStream.cpp?rev=765718&r1=765717&r2=765718&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-2.x/src/main/decaf/io/DataOutputStream.cpp (original)
+++ activemq/activemq-cpp/branches/activemq-cpp-2.x/src/main/decaf/io/DataOutputStream.cpp Thu Apr 16 18:50:59 2009
@@ -353,7 +353,9 @@
}
this->writeUnsignedShort( (unsigned short)utfLength );
- this->write( &utfBytes[0], 0, utfIndex );
+ if( utfLength > 0 ) {
+ this->write( &utfBytes[0], 0, utfLength );
+ }
}
DECAF_CATCH_RETHROW( UTFDataFormatException )
DECAF_CATCH_RETHROW( IOException )
Modified: activemq/activemq-cpp/branches/activemq-cpp-2.x/src/test/activemq/connector/openwire/utils/OpenwireStringSupportTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-2.x/src/test/activemq/connector/openwire/utils/OpenwireStringSupportTest.cpp?rev=765718&r1=765717&r2=765718&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-2.x/src/test/activemq/connector/openwire/utils/OpenwireStringSupportTest.cpp (original)
+++ activemq/activemq-cpp/branches/activemq-cpp-2.x/src/test/activemq/connector/openwire/utils/OpenwireStringSupportTest.cpp Thu Apr 16 18:50:59 2009
@@ -106,7 +106,7 @@
ByteArrayInputStream myStream( input, inputLength );
DataInputStream reader( &myStream );
- std::string result = reader.readUTF();
+ std::string result = OpenwireStringSupport::readString( reader );
for( std::size_t i = 0; i < result.length(); ++i ) {
CPPUNIT_ASSERT( (unsigned char)result[i] == expect[i] );