JDK-8342465 : Improve API documentation for java.lang.classfile
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.lang.classfile
  • Affected Version: 24
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-10-16
  • Updated: 2025-01-27
  • Resolved: 2025-01-27
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 JDK 25
24Fixed 25 masterFixed
Related Reports
CSR :  
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
Actions:

1. Improve specfication for IAE in all cf format (reading) and user-supplied (writing)
2. CHR notes: class loading may affect Agents!
Comments
A pull request was submitted for review. Branch: jdk24 URL: https://git.openjdk.org/jdk/pull/23317 Date: 2025-01-27 15:16:12 +0000
27-01-2025

Changeset: 1d8ccb89 Branch: master Author: Chen Liang <liach@openjdk.org> Date: 2025-01-27 14:03:35 +0000 URL: https://git.openjdk.org/jdk/commit/1d8ccb89204cc5efbcecdaa0c9de7b2c5a109d5d
27-01-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/23277 Date: 2025-01-23 19:48:55 +0000
23-01-2025

Comment by [~darcy] from JDK-8334720: For AnnotationValue, the TAG_FOO constants would be better if the javadoc specification contained an {@value } tags with the int formatted to the corresponding character. Similar feedback for types like AnnotationValue.OfAnnotation. IMO, "The tag of this value is 64." would be better as "The tag of this value is @." Also for the ClassFile interface the various constants could have hex value displayed for them using a formatting @value tag, as done in java.lang.reflect.AccessFlag, e.g. "...with a mask value of <code>{@value "0x%04x" Modifier#PUBLIC}</code>" (Since the interfaces in the API are sealed and not user extensible, generally don't need implSpec tags for the default methods.) At least one of the API elements that refer to the opcode would benefit from having @jvms links to the opcode. A formatting nit, in javadoc replacing i'th with <i>i</i><sup>th</sup> renders to a more pleasing result, IMO.
14-11-2024