JDK-8339641 : Release Note: javac Accepts class Files With Any Number of Entries in RuntimeVisibleParameterAnnotations and RuntimeInvisibleParameterAnnotations Attributes
  • Type: Sub-task
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 24
  • Priority: P4
  • Status: Resolved
  • Resolution: Delivered
  • Submitted: 2024-09-06
  • Updated: 2024-09-19
  • Resolved: 2024-09-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 24
24Resolved
Description
The Java Virtual Machine Specification is permissive regarding the number of entries of the `RuntimeVisibleParameterAnnotations` and `RuntimeInvisibleParameterAnnotations` attributes in the `class` file format. The javac tool was less permissive, and was rejecting `class` files that had a different number of entries than javac expected.

With JDK 24, this is fixed, and javac now accepts `class` files with any number of entries in the `RuntimeVisibleParameterAnnotations` and `RuntimeInvisibleParameterAnnotations` attributes. A compile-time warning is produced if the content of the attributes cannot be mapped to the corresponding method's parameters.