summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_message.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/google/protobuf/compiler/javanano/javanano_message.cc b/src/google/protobuf/compiler/javanano/javanano_message.cc
index 008bec2..3a1b5a5 100644
--- a/src/google/protobuf/compiler/javanano/javanano_message.cc
+++ b/src/google/protobuf/compiler/javanano/javanano_message.cc
@@ -304,8 +304,8 @@ GenerateMessageSerializationMethods(io::Printer* printer) {
printer->Print(
"\n"
"@Override\n"
- "public int getSerializedSize() {\n"
- " int size = super.getSerializedSize();\n");
+ "protected int computeSerializedSize() {\n"
+ " int size = super.computeSerializedSize();\n");
printer->Indent();
for (int i = 0; i < descriptor_->field_count(); i++) {
@@ -314,7 +314,6 @@ GenerateMessageSerializationMethods(io::Printer* printer) {
printer->Outdent();
printer->Print(
- " cachedSize = size;\n"
" return size;\n"
"}\n");
}