RFR: 7903673: Jextract throws NPE when generating enum constant javadoc [v2]

Jorn Vernee jvernee at openjdk.org
Mon Feb 19 15:39:03 UTC 2024


On Mon, 19 Feb 2024 15:27:26 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> This PR fixes `TreeMaker` so that it doesn't try to generate javadoc for `null` enum constants.
>> 
>> Unfortunately I was not able to reproduce on Linux. The problem seems to appear on MacOS when extracting this enum:
>> 
>> 
>> enum __CFByteOrder {
>>     CFByteOrderUnknown,
>>     CFByteOrderLittleEndian,
>>     CFByteOrderBigEndian
>> }; 
>> 
>> 
>> But there doesn't seem to be anything peculiar with this (and this does work when extracted in isolation).
>> It might indicate a deeper issue in libclang. For now, I made the code more robust, so that it handles possible null enum constants (these are left out from the IR).
>
> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Address review comment

Marked as reviewed by jvernee (Committer).

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

PR Review: https://git.openjdk.org/jextract/pull/219#pullrequestreview-1888714703


More information about the jextract-dev mailing list