summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Duff <bduff@google.com>2015-01-21 13:02:59 -0800
committerBrian Duff <bduff@google.com>2015-01-22 02:14:29 +0000
commitd270ce1431d40af4caebdcac447cf762036ade1c (patch)
treea519c8ddbb21af6ea2ede4b3f35f68ba08821f23
parente6ae5ecfc360e1ad261b561c8e5e16b6554d5347 (diff)
downloadexternal_protobuf-d270ce1431d40af4caebdcac447cf762036ade1c.zip
external_protobuf-d270ce1431d40af4caebdcac447cf762036ade1c.tar.gz
external_protobuf-d270ce1431d40af4caebdcac447cf762036ade1c.tar.bz2
Exclude cachedSize when printing fields.
Change-Id: I85563b74237d38c1e447b7286f5f6e62d57e3d63
-rw-r--r--java/src/main/java/com/google/protobuf/nano/MessageNanoPrinter.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/java/src/main/java/com/google/protobuf/nano/MessageNanoPrinter.java b/java/src/main/java/com/google/protobuf/nano/MessageNanoPrinter.java
index 4cca3d5..a30f2f3 100644
--- a/java/src/main/java/com/google/protobuf/nano/MessageNanoPrinter.java
+++ b/java/src/main/java/com/google/protobuf/nano/MessageNanoPrinter.java
@@ -108,6 +108,10 @@ public final class MessageNanoPrinter {
for (Field field : clazz.getFields()) {
int modifiers = field.getModifiers();
String fieldName = field.getName();
+ if ("cachedSize".equals(fieldName)) {
+ // TODO(bduff): perhaps cachedSize should have a more obscure name.
+ continue;
+ }
if ((modifiers & Modifier.PUBLIC) == Modifier.PUBLIC
&& (modifiers & Modifier.STATIC) != Modifier.STATIC