Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8334870 javac does not accept classfiles with certain permitted RuntimeVisibleParameterAnnotations and RuntimeInvisibleParameterAnnotations attributes
  3. JDK-8339641

Release Note: javac Accepts class Files With Any Number of Entries in RuntimeVisibleParameterAnnotations and RuntimeInvisibleParameterAnnotations Attributes

XMLWordPrintable

      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.

            jlahoda Jan Lahoda
            jlahoda Jan Lahoda
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: