From 535301894efb5ae340d835a4b1de465f3beeb487 Mon Sep 17 00:00:00 2001 From: "kenton@google.com" Date: Thu, 7 Jan 2010 02:08:03 +0000 Subject: Address comments from various code reviews. --- java/src/main/java/com/google/protobuf/TextFormat.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'java') 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 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 list) throws ParseException { final char quote = currentToken.length() > 0 ? currentToken.charAt(0) : '\0'; if (quote != '\"' && quote != '\'') { -- cgit v1.2.3