RFR: 8311102: Write annotations in the classfile dumped by SA [v2]
    Ashutosh Mehra 
    duke at openjdk.org
       
    Tue Jul 11 19:39:29 UTC 2023
    
    
  
On Tue, 11 Jul 2023 06:39:09 GMT, Thomas Stuefe <stuefe at openjdk.org> 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
    
    
More information about the serviceability-dev
mailing list