RFR: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations [v8]
Adam Sotona
asotona at openjdk.org
Mon May 13 07:54:09 UTC 2024
On Sun, 12 May 2024 15:11:17 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
>>
>> fixed tests
>
> src/java.base/share/classes/java/lang/classfile/Attributes.java line 153:
>
>> 151:
>> 152: /**
>> 153: * {@return Attribute mapper for the {@code AnnotationDefault} attribute}
>
> Just wondering, can we change `{@code AnnotationDefault}` to `{@value #NAME_ANNOTATION_DEFAULT}`, etc? This way, the names are still rendered as code in Javadoc HTML, but they are generated with links to the constants, and programmers will see these constants and prefer them over hardcoded values.
On the other side it is questionable if the attribute names should be exposed in the API. We provide corresponding mappers and attribute models. I don't see a case where user would need to use the attribute names directly.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19006#discussion_r1598026518
More information about the compiler-dev
mailing list