Integrated: 8256809: Annotation processing causes NPE during flow analysis

Elliott Baron ebaron at openjdk.java.net
Mon Nov 23 16:06:00 UTC 2020


On Fri, 20 Nov 2020 22:22:17 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.

This pull request has now been integrated.

Changeset: 8ddf5e17
Author:    Elliott Baron <ebaron at openjdk.org>
Committer: Jan Lahoda <jlahoda at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/8ddf5e17
Stats:     160 lines in 2 files changed: 159 ins; 0 del; 1 mod

8256809: Annotation processing causes NPE during flow analysis

Reviewed-by: jlahoda

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

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


More information about the compiler-dev mailing list