RFR: 8256809: Annotation processing causes NPE during flow analysis
ebaron at openjdk.java.net
Fri Nov 20 22:27:15 UTC 2020
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.
- Remove debug output from test
- 8256809: Annotation processing causes NPE during flow analysis
Stats: 160 lines in 2 files changed: 159 ins; 0 del; 1 mod
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1359/head:pull/1359
More information about the compiler-dev