diff options
author | Brian Duff <bduff@google.com> | 2015-01-21 13:02:59 -0800 |
---|---|---|
committer | Brian Duff <bduff@google.com> | 2015-04-28 12:44:08 -0700 |
commit | 714dba3ab8f1b608573a33bb3ed4051ceb955b5b (patch) | |
tree | e9d24a56de40e0e5f6b780d711c7b23deb787693 | |
parent | d099a88685bf4b2df1689eb4cc56e75065cb87b1 (diff) |
Exclude cachedSize when printing fields.
Change-Id: I85563b74237d38c1e447b7286f5f6e62d57e3d63
-rw-r--r-- | javanano/src/main/java/com/google/protobuf/nano/MessageNanoPrinter.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/javanano/src/main/java/com/google/protobuf/nano/MessageNanoPrinter.java b/javanano/src/main/java/com/google/protobuf/nano/MessageNanoPrinter.java index c4b2ad3d..d9500bb9 100644 --- a/javanano/src/main/java/com/google/protobuf/nano/MessageNanoPrinter.java +++ b/javanano/src/main/java/com/google/protobuf/nano/MessageNanoPrinter.java @@ -109,6 +109,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 |