[jdk17] RFR: JDK-8269150 Unicode \u005C not treated as an escaping backslash [v4]

Joe Darcy darcy at openjdk.java.net
Wed Jul 14 22:26:15 UTC 2021


On Mon, 12 Jul 2021 12:55:53 GMT, Jim Laskey <jlaskey at openjdk.org> wrote:

>> \u005C Unicode escape sequence not being treated as a backslash for general escape sequences.
>
> Jim Laskey has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
> 
>  - Merge branch 'master' into 8269150
>  - Updated the test to include all combinations
>  - Merge branch 'master' into 8269150
>  - Correct unicode escape handling in UnicodeReader, added test

test/langtools/tools/javac/T8269150/T8269150.java line 31:

> 29:  */
> 30: 
> 31: public class T8269150 {

Please, please, please give the test a meaningful name other than a bug id. (It is true javac tested used to follow that naming convention, but it has largely been abandoned.)

test/langtools/tools/javac/T8269150/T8269150.java line 33:

> 31: public class T8269150 {
> 32:     public static void main(String... args) {
> 33:         String source = """

The test here would be clearer if written as a 2-D array of strings where the alternative forms of a particular sequence of characters were side-by-side on the same line.

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

PR: https://git.openjdk.java.net/jdk17/pull/126


More information about the compiler-dev mailing list