RFR: 8318124: JFR: Rewrite instrumentation to use Class-File API [v2]
Erik Gahlin
egahlin at openjdk.org
Mon Oct 16 05:07:44 UTC 2023
On Sun, 15 Oct 2023 23:45:05 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Erik Gahlin has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Updates
>
> src/jdk.jfr/share/classes/jdk/jfr/internal/EventInstrumentation.java line 204:
>
>> 202: String typeDescriptor = classDesc.descriptorString();
>> 203: for (ClassElement ce : classModel.elements()) {
>> 204: if (ce instanceof RuntimeVisibleAnnotationsAttribute rvaa) {
>
> You can use `classModel.findAttribute(Attributes.RUNTIME_VISIBLE_ANNOTATIONS)` instead of looping.
I could not get it to work with findAttribute. No annotations were found.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16195#discussion_r1360107669
More information about the core-libs-dev
mailing list