On Tue, 11 Jul 2023 06:39:09 GMT, Thomas Stuefe <[email protected]> wrote:
>> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ConstMethod.java
>> line 470:
>>
>>> 468: if (hasParameterAnnotations()) {
>>> 469: offset += 1;
>>> 470: }
>>
>> Code here and in other places could be tightened:
>>
>>
>> int offset = (hasMethodAnnotations() ? 1 : 0) +
>> (hasParameterAnnotations() ? 1 : 0) +
>> (hasTypeAnnotations() ? 1 : 0);
>
> Possibly even factor it out into separate functions like e.g.
> `offsetOfGenericSignatureIndex` does.
Done.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14735#discussion_r1260193515