RFR (CSR) - JDK-8223781 String::translateEscapes (Preview)

Alex Buckley alex.buckley at oracle.com
Fri May 24 17:35:06 UTC 2019

It's a bit heavy to cite a JLS section in the summary of a method. 

"Returns a string whose value is this string, with escape sequences 
translated as if in a string literal."  [Not mentioning text blocks for 
simplicity. Plus, if you mention them, then it looks like you forgot 
character literals.]

@jls 3.10.7 Escape Sequences  [note the new shorter name]

@deprecated  This method is associated with text blocks, a preview 
language feature. Text blocks and/or this method may be changed or 
removed in a future release.  [Also for stripIndent]


On 5/24/2019 5:22 AM, Jim Laskey wrote:
> Please do a CSR review of the new String:: translateEscapes instance
> method. This instance method is being introduced to support JEP-355:
> Text Blocks, by translating escape sequences in the text block content.
> Thank you.
> -- Jim
> csr: https://bugs.openjdk.java.net/browse/JDK-8223781
> webrev: http://cr.openjdk.java.net/~jlaskey/8223780/webrev-03
> jbs: https://bugs.openjdk.java.net/browse/JDK-8223780
> jep: https://bugs.openjdk.java.net/browse/JDK-8222530

More information about the compiler-dev mailing list