aboutsummaryrefslogtreecommitdiffhomepage
path: root/java
diff options
context:
space:
mode:
authorGravatar kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2010-01-07 02:08:03 +0000
committerGravatar kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2010-01-07 02:08:03 +0000
commit535301894efb5ae340d835a4b1de465f3beeb487 (patch)
treec816894658e7260d2f2433e96ed116d5460e7af2 /java
parent2429e3a0deb0b26b8723c717555c09d14842373f (diff)
Address comments from various code reviews.
Diffstat (limited to 'java')
-rw-r--r--java/src/main/java/com/google/protobuf/TextFormat.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/java/src/main/java/com/google/protobuf/TextFormat.java b/java/src/main/java/com/google/protobuf/TextFormat.java
index ed26722d..cb23f0c3 100644
--- a/java/src/main/java/com/google/protobuf/TextFormat.java
+++ b/java/src/main/java/com/google/protobuf/TextFormat.java
@@ -704,7 +704,13 @@ public final class TextFormat {
return ByteString.copyFrom(list);
}
- public void consumeByteString(List<ByteString> list) throws ParseException {
+ /**
+ * Like {@link #consumeByteString()} but adds each token of the string to
+ * the given list. String literals (whether bytes or text) may come in
+ * multiple adjacent tokens which are automatically concatenated, like in
+ * C or Python.
+ */
+ private void consumeByteString(List<ByteString> list) throws ParseException {
final char quote = currentToken.length() > 0 ? currentToken.charAt(0)
: '\0';
if (quote != '\"' && quote != '\'') {