RFR: 8303623: Compiler should disallow non-standard UTF-8 string encodings [v6]

Archie L. Cobbs duke at openjdk.org
Tue Mar 28 13:39:31 UTC 2023


On Mon, 27 Mar 2023 19:43:30 GMT, Vicente Romero <vromero at openjdk.org> wrote:

>> Archie L. Cobbs has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Control behavior via a Feature instead of via direct Source comparison.
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/util/Convert.java line 71:
> 
>> 69:      * Do strict validation of UTF-8. At this level, each character has only one valid encoding.
>> 70:      */
>> 71:     public static final int UTF8_STRICT = 2;
> 
> this three constants could be converted into an enum

Good idea, thanks. Fixed in 382d0e44c25.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/12893#discussion_r1150624076


More information about the compiler-dev mailing list