summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Duff <bduff@google.com>2015-01-23 19:55:14 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-01-23 19:55:14 +0000
commit803e1bbc8baa74b3e41230e3cec68b65e1e636f2 (patch)
treee70b7c579f41221fb2c4ba20c2315917318b3193
parentd6973b18599ca53300e203336669f7077f4fa399 (diff)
parentbb2b6d9bb01780ba28a0b9c42758468929a6c002 (diff)
downloadexternal_protobuf-803e1bbc8baa74b3e41230e3cec68b65e1e636f2.zip
external_protobuf-803e1bbc8baa74b3e41230e3cec68b65e1e636f2.tar.gz
external_protobuf-803e1bbc8baa74b3e41230e3cec68b65e1e636f2.tar.bz2
am bb2b6d9b: am 1c2c4706: Merge "Exclude cachedSize when printing fields."
* commit 'bb2b6d9bb01780ba28a0b9c42758468929a6c002': Exclude cachedSize when printing fields.
-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