RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v3]
Claes Redestad
redestad at openjdk.org
Fri Apr 26 08:10:35 UTC 2024
On Thu, 25 Apr 2024 23:03:58 GMT, Chen Liang <liach at openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/constant/MethodTypeDescImpl.java line 181:
>>
>>> 179: sb.append(argType.descriptorString());
>>> 180: }
>>> 181: desc = sb.append(')').append(returnType().descriptorString()).toString();
>>
>> Nit: the rest of the code (and even the new sizing part you added) uses `returnType` instead of `returnType()`
>
> Think the `returnType()` call was for parity with displayDescriptor changes; now that we are just in the impl class, either way is fine.
Thanks, fixed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18945#discussion_r1580645953
More information about the core-libs-dev
mailing list