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

Elliott Baron ebaron at openjdk.java.net
Sat Nov 21 02:06:20 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.

Elliott Baron has updated the pull request incrementally with one additional commit since the last revision:

  Fix processor-path in test


  - all: https://git.openjdk.java.net/jdk/pull/1359/files
  - new: https://git.openjdk.java.net/jdk/pull/1359/files/69372295..2ca76c32

 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1359&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1359&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1359.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1359/head:pull/1359

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

More information about the compiler-dev mailing list