[jdk21u-dev] RFR: 8334870: javac does not accept classfiles with certain permitted RuntimeVisibleParameterAnnotations and RuntimeInvisibleParameterAnnotations attributes
Liam Miller-Cushon
cushon at openjdk.org
Fri Jun 27 16:23:01 UTC 2025
This change allows javac to tolerate `RuntimeVisibleParameterAnnotations` and `RuntimeInvisibleParameterAnnotations` that do not contain entries for all parameters, or that contain additional entries.
Currently class reading crashes with an `ArrayIndexOutOfBoundsException` if the attributes contain fewer than the expected number of parameters, which leaves method symbols in an invalid state and causes the crash discussed in [JDK-8359336](https://bugs.openjdk.org/browse/JDK-8359336).
-------------
Commit messages:
- Handle changes to classfile API
- Backport 5e822c24bb42e9027c8d9090d498bca7125d1963
Changes: https://git.openjdk.org/jdk21u-dev/pull/1930/files
Webrev: https://webrevs.openjdk.org/?repo=jdk21u-dev&pr=1930&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8334870
Stats: 1249 lines in 6 files changed: 859 ins; 382 del; 8 mod
Patch: https://git.openjdk.org/jdk21u-dev/pull/1930.diff
Fetch: git fetch https://git.openjdk.org/jdk21u-dev.git pull/1930/head:pull/1930
PR: https://git.openjdk.org/jdk21u-dev/pull/1930
More information about the jdk-updates-dev
mailing list