From 9ac84f8f3fea9797953a8c738b7fae652d968637 Mon Sep 17 00:00:00 2001 From: Patrick Strawderman Date: Fri, 16 Sep 2016 14:54:58 -0700 Subject: [PATCH] Fix erroneous comment regarding String.substring Since Java 7, Strings produced with String.substring do not share byte arrays. --- java/core/src/main/java/com/google/protobuf/ByteString.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/core/src/main/java/com/google/protobuf/ByteString.java b/java/core/src/main/java/com/google/protobuf/ByteString.java index 496538994cb..3f3f9f3c3cd 100644 --- a/java/core/src/main/java/com/google/protobuf/ByteString.java +++ b/java/core/src/main/java/com/google/protobuf/ByteString.java @@ -52,9 +52,9 @@ /** * Immutable sequence of bytes. Substring is supported by sharing the reference - * to the immutable underlying bytes, as with {@link String}. Concatenation is - * likewise supported without copying (long strings) by building a tree of - * pieces in {@link RopeByteString}. + * to the immutable underlying bytes. Concatenation is likewise supported + * without copying (long strings) by building a tree of pieces in + * {@link RopeByteString}. *

* Like {@link String}, the contents of a {@link ByteString} can never be * observed to change, not even in the presence of a data race or incorrect