-
Bug
-
Resolution: Fixed
-
P4
-
24
-
b15
JVMS 4.7.18 and 4.7.19 say this about the entries in the RuntimeVisibleParameterAnnotations and RuntimeInvisibleParameterAnnotations attributes:
The i'th entry in the parameter_annotations table may, but is not required to, correspond to the i'th parameter descriptor in the method descriptor (§4.3.3).
I.e. there is no requirement for this attribute to contain entries for all parameters, and it is not required for this attribute to not contain additional entries. (It also does not specify the ordering of the annotations.) javac only accepts these attributes if the number of entries matches the number of parameters in the Signature attribute, or the number of parameters in the method descriptor if the Signature attribute is not present.
javac should be adjusted to tolerate other attributes as well, possibly by ignoring them, if it cannot heuristically assign the annotations to the parameters.
The i'th entry in the parameter_annotations table may, but is not required to, correspond to the i'th parameter descriptor in the method descriptor (§4.3.3).
I.e. there is no requirement for this attribute to contain entries for all parameters, and it is not required for this attribute to not contain additional entries. (It also does not specify the ordering of the annotations.) javac only accepts these attributes if the number of entries matches the number of parameters in the Signature attribute, or the number of parameters in the method descriptor if the Signature attribute is not present.
javac should be adjusted to tolerate other attributes as well, possibly by ignoring them, if it cannot heuristically assign the annotations to the parameters.
- csr for
-
JDK-8334871 javac does not accept classfiles with certain permitted RuntimeVisibleParameterAnnotations and RuntimeInvisibleParameterAnnotations attributes
- Closed
- relates to
-
JDK-8024694 javac always expects signature attribute for enum constructors
- Closed
- links to
-
Commit(master) openjdk/jdk/5e822c24
-
Review(master) openjdk/jdk/19860