Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: third_party/protobuf/java/core/src/main/java/com/google/protobuf/MessageLiteToString.java

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Make chrome settings proto generated file a component Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/protobuf/java/core/src/main/java/com/google/protobuf/MessageLiteToString.java
diff --git a/third_party/protobuf/java/core/src/main/java/com/google/protobuf/MessageLiteToString.java b/third_party/protobuf/java/core/src/main/java/com/google/protobuf/MessageLiteToString.java
index 43847651fe7ff4e711828b3b41934b4879109ba0..23373ef4cdc772ded802d18429e2f1732d9f7cd2 100644
--- a/third_party/protobuf/java/core/src/main/java/com/google/protobuf/MessageLiteToString.java
+++ b/third_party/protobuf/java/core/src/main/java/com/google/protobuf/MessageLiteToString.java
@@ -95,7 +95,7 @@ final class MessageLiteToString {
// Try to reflectively get the value and toString() the field as if it were repeated. This
// only works if the method names have not be proguarded out or renamed.
Method listMethod = nameToNoArgMethod.get("get" + suffix);
- if (listMethod != null) {
+ if (listMethod != null && listMethod.getReturnType().equals(List.class)) {
printField(
buffer,
indent,
@@ -115,7 +115,7 @@ final class MessageLiteToString {
// Heuristic to skip bytes based accessors for string fields.
continue;
}
-
+
String camelCase = suffix.substring(0, 1).toLowerCase() + suffix.substring(1);
// Try to reflectively get the value and toString() the field as if it were optional. This

Powered by Google App Engine
This is Rietveld 408576698