Skip to content
Permalink
Browse files
Fixing externizable encoding
git-svn-id: https://svn.apache.org/repos/asf/activemq/activemq-protobuf/trunk@746106 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
chirino committed Feb 20, 2009
1 parent 76abeef commit fadceb26c9213b2677573d95af4e01b952b69bd8
Showing 1 changed file with 3 additions and 5 deletions.
@@ -22,13 +22,10 @@
import static org.apache.activemq.protobuf.WireFormat.WIRETYPE_VARINT;
import static org.apache.activemq.protobuf.WireFormat.makeTag;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashSet;
@@ -1449,7 +1446,7 @@ private void generateReadWriteExternal(MessageDescriptor m) {
if( repeated ) {
p("if( bean.f_"+lname+"!=null ) {");
indent();
p("out.writeInt(bean.f_"+lname+".size());");
p("out.writeShort(bean.f_"+lname+".size());");
p("for(" + javaCollectionType(field) + " o : bean.f_"+lname+") {");
indent();

@@ -1475,9 +1472,10 @@ private void generateReadWriteExternal(MessageDescriptor m) {
}
unindent();
p("}");
unindent();
p("} else {");
indent();
p("out.writeInt(-1);");
p("out.writeShort(-1);");
unindent();
p("}");

0 comments on commit fadceb2

Please sign in to comment.