RFR: 7903776: jextract generates uncompilable code when C identifier with the name from "java.lang" classes is used [v2]

Athijegannathan Sundararajan sundar at openjdk.org
Wed Jul 17 09:46:35 UTC 2024


On Tue, 16 Jul 2024 14:28:14 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Athijegannathan Sundararajan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   review comments.
>
> src/main/java/org/openjdk/jextract/impl/NameMangler.java line 339:
> 
>> 337:                     // java.lang package is auto-imported. Check if we've clash
>> 338:                     // of the given identifier with any of the java.lang.* types.
>> 339:                     Class.forName("java.lang." + name);
> 
> 1. Should we cache the results?
> 2. This detects package-private classes in java.lang too, which might not be desired. Maybe `yield clazz.accessFlags().contains(AccessFlag.PUBLIC)`

Will fix

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

PR Review Comment: https://git.openjdk.org/jextract/pull/253#discussion_r1680754013


More information about the jextract-dev mailing list