RFR: 8305971: NPE in JavacProcessingEnvironment for missing enum constructor body

Vicente Romero vromero at openjdk.org
Thu Sep 28 21:31:20 UTC 2023


Please review this simple fix that is averting a NPE in JavacProcessingEnvironment if a an annotation processor is used while compiling this erroneous code:


enum T {
  ONE("");

  T(String one);  // missing constructor body

  final String one;
}

the fix is a one liner
TIA

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

Commit messages:
 - 8305971: NPE in JavacProcessingEnvironment for missing enum constructor body

Changes: https://git.openjdk.org/jdk/pull/15974/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15974&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8305971
  Stats: 59 lines in 4 files changed: 58 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/15974.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/15974/head:pull/15974

PR: https://git.openjdk.org/jdk/pull/15974


More information about the compiler-dev mailing list