RFR: 8320144: Compilation crashes when a custom annotation with invalid default value is used [v4]

Aggelos Biboudis abimpoudis at openjdk.org
Wed Dec 6 11:40:47 UTC 2023


> The erroneous case of:
> 
> `public String[] excludeModules() default new String[0];`
> 
> was not short-circuited in the compiler and we were getting an NPE in `l.nonEmpty()` for `l`. Now, `getAnnotationArrayValue` returns the error attribute, if that case is detected.

Aggelos Biboudis has updated the pull request incrementally with one additional commit since the last revision:

  Small fix to let attribution for potential elements pass through

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/16977/files
  - new: https://git.openjdk.org/jdk/pull/16977/files/83340888..9922d38e

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=16977&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16977&range=02-03

  Stats: 7 lines in 3 files changed: 5 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/16977.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16977/head:pull/16977

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


More information about the compiler-dev mailing list