RFR: JDK-8263261 Extend String::translateEscapes to support unicode escapes [v13]
ExE Boss
duke at openjdk.org
Mon Jan 29 19:18:41 UTC 2024
On Fri, 26 Jan 2024 17:36:52 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:
>
> Requested changes
src/java.base/share/classes/java/lang/String.java line 4229:
> 4227: * <th scope="row">{@code \u005CuXXXX}</th>
> 4228: * <td>Unicode escape</td>
> 4229: * <td>single UTF-16 code unit equivalent {@code U+XXXX}<p>multiple 'u' are support per jls 3.3</td>
Suggestion:
* <td>single UTF-16 code unit equivalent {@code U+XXXX}<p>multiple 'u' are supported per JLS 3.3</td>
test/jdk/java/lang/String/TranslateEscapes.java line 120:
> 118: }
> 119: }
> 120:
This method is unused:
Suggestion:
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17491#discussion_r1470081472
PR Review Comment: https://git.openjdk.org/jdk/pull/17491#discussion_r1470082839
More information about the core-libs-dev
mailing list