From a52662db9e519dfd5724479b516126e04121c68c Mon Sep 17 00:00:00 2001 From: Liam Miller-Cushon Date: Wed, 20 Nov 2024 08:30:37 -0800 Subject: [PATCH] Add a comment linking Error Prone's SourceCodeEscapers with the Guava FR PiperOrigin-RevId: 698400764 --- .../java/com/google/errorprone/util/SourceCodeEscapers.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/check_api/src/main/java/com/google/errorprone/util/SourceCodeEscapers.java b/check_api/src/main/java/com/google/errorprone/util/SourceCodeEscapers.java index 7115a832dc3..7464953d8c1 100644 --- a/check_api/src/main/java/com/google/errorprone/util/SourceCodeEscapers.java +++ b/check_api/src/main/java/com/google/errorprone/util/SourceCodeEscapers.java @@ -69,8 +69,14 @@ public static CharEscaper javaCharEscaper() { * Returns an {@link Escaper} instance that escapes special characters in a string so it can * safely be included in either a Java text block. * + *

Double quotes are not escaped. If the string contents contain a run of three or more + * consecutive double quotes, additional action is required to make it safe to include in a text + * block. + * *

See: The Java Language Specification for more details. + * + *

The Guava FR for this is: https://github.com/google/guava/issues/7421 */ public static CharEscaper getJavaTextBlockEscaper() { return JAVA_TEXT_BLOCK_ESCAPER;