aboutsummaryrefslogtreecommitdiffhomepage
path: root/java/src/main/java/com/google/protobuf/AbstractMessage.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/main/java/com/google/protobuf/AbstractMessage.java')
-rw-r--r--java/src/main/java/com/google/protobuf/AbstractMessage.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/java/src/main/java/com/google/protobuf/AbstractMessage.java b/java/src/main/java/com/google/protobuf/AbstractMessage.java
index 6de4cae3..cc89173a 100644
--- a/java/src/main/java/com/google/protobuf/AbstractMessage.java
+++ b/java/src/main/java/com/google/protobuf/AbstractMessage.java
@@ -83,10 +83,10 @@ public abstract class AbstractMessage extends AbstractMessageLite
}
public void writeTo(final CodedOutputStream output) throws IOException {
- MessageReflection.writeMessageTo(this, output, false);
+ MessageReflection.writeMessageTo(this, getAllFields(), output, false);
}
- private int memoizedSize = -1;
+ protected int memoizedSize = -1;
public int getSerializedSize() {
int size = memoizedSize;
@@ -94,7 +94,7 @@ public abstract class AbstractMessage extends AbstractMessageLite
return size;
}
- memoizedSize = MessageReflection.getSerializedSize(this);
+ memoizedSize = MessageReflection.getSerializedSize(this, getAllFields());
return memoizedSize;
}