activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r929122 - /activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/tests/AmqCppTestMarshallingClassesGenerator.java
Date Tue, 30 Mar 2010 13:00:52 GMT
Author: tabish
Date: Tue Mar 30 13:00:51 2010
New Revision: 929122

URL: http://svn.apache.org/viewvc?rev=929122&view=rev
Log:
Update the code generator to use new API functions.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/tests/AmqCppTestMarshallingClassesGenerator.java

Modified: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/tests/AmqCppTestMarshallingClassesGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/tests/AmqCppTestMarshallingClassesGenerator.java?rev=929122&r1=929121&r2=929122&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/tests/AmqCppTestMarshallingClassesGenerator.java
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/tests/AmqCppTestMarshallingClassesGenerator.java
Tue Mar 30 13:00:51 2010
@@ -122,7 +122,8 @@ out.println("        dataOut.writeByte( 
 out.println("        marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut
);");
 out.println("");
 out.println("        // Now read it back in and make sure it's all right.");
-out.println("        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );");
+out.println("        std::pair<const unsigned char*, int> array = baos.toByteArray();");
+out.println("        ByteArrayInputStream bais( array.first, array.second, true );");
 out.println("        DataInputStream dataIn( &bais );");
 out.println("        unsigned char dataType = dataIn.readByte();");
 out.println("        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );");
@@ -184,7 +185,8 @@ out.println("        bs.marshal( &dataOu
 out.println("        marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut,
&bs );");
 out.println("");
 out.println("        // Now read it back in and make sure it's all right.");
-out.println("        ByteArrayInputStream bais( baos.toByteArray(), (int)baos.size() );");
+out.println("        std::pair<const unsigned char*, int> array = baos.toByteArray();");
+out.println("        ByteArrayInputStream bais( array.first, array.second, true );");
 out.println("        DataInputStream dataIn( &bais );");
 out.println("");
 out.println("        unsigned char dataType = dataIn.readByte();");



Mime
View raw message