RFR: 8245153 Unicode encoded double-quoted empty string does not compile

Jim Laskey james.laskey at oracle.com
Thu May 28 15:02:26 UTC 2020


s4 is about trying to trick up the UnicodeReader on handling the double backslash after repositioning. Interpret it as having the content "\\" + "u0022" .


> On May 28, 2020, at 11:57 AM, Roland Illig <roland.illig at gmx.de> wrote:
> 
> On 28.05.2020 14:02, Jim Laskey wrote:
>> Your test should include:
>> 
>>     String s1 = \u0022\u0022;
>>     String s2 = "\u0022;
>>     String s3 = \u0022";
>>     String s4 = \u0022\\u0022\u0022;
> 
> s4.length == 6, according to JLS14 § 3.3, keyword "eligible".
> 
> I'm not sure whether that was intended or not, therefore I'd add:
> 
>    String s5 = \u0022\u005C\u0022\u0022;



More information about the compiler-dev mailing list