RFR: 8256809: Annotation processing causes NPE during flow analysis [v2]

Jan Lahoda jlahoda at openjdk.java.net
Mon Nov 23 08:23:59 UTC 2020


On Sat, 21 Nov 2020 02:06:20 GMT, Elliott Baron <ebaron at openjdk.org> wrote:

>> If an error is found in JavacProcessingEnvironment.newRound, the erroneous ClassSymbols are meant to have their types replaced with new ClassTypes. There is a bug here where the check for whether a ClassSymbol is erroneous happens after the ClassSymbol is reset, replacing its kind with `TYP`. This means the check always fails, and the `kind == ERR` branch is never taken.
>> 
>> This can lead to a NullPointerException later on during flow analysis, which I've captured with the included test.
>
> Elliott Baron has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix processor-path in test

Looks good!

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

Marked as reviewed by jlahoda (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/1359


More information about the compiler-dev mailing list