RFR: JDK-8263261 Extend String::translateEscapes to support unicode escapes [v9]

Alan Bateman alanb at openjdk.org
Fri Jan 26 08:41:35 UTC 2024


On Wed, 24 Jan 2024 13:23:49 GMT, Jim Laskey <jlaskey at openjdk.org> wrote:

>> Currently String::translateEscapes does not support unicode escapes, reported as a IllegalArgumentException("Invalid escape sequence: ..."). String::translateEscapes should translate unicode escape sequences to provide full coverage,
>
> Jim Laskey has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update String.java

src/java.base/share/classes/java/lang/String.java line 4238:

> 4236:      * @return String with escape sequences and unicode escapes translated.
> 4237:      *
> 4238:      * @implNote Normally, unicode escapes are translated by the compiler before string

A minor comment on the implNote is that it better to drop "Normally," from the beginning of this sentence and "However," from the second sentence. I think it would read a bit better.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17491#discussion_r1467358224


More information about the core-libs-dev mailing list