RFR: 8357178: Simplify Class::componentType [v2]

Joe Darcy darcy at openjdk.org
Mon May 19 16:20:50 UTC 2025


On Sun, 18 May 2025 21:15:21 GMT, Chen Liang <liach at openjdk.org> wrote:

> > Did you consider calling getComponentType(), which already returns the field?
> 
> I don't think we want an extra indirection here - The logic here is quite simple. Counterargument could be that `MethodType::descriptorString` calls `toMethodDescriptorString`, except these methods involve more complex caching and is not simple like this field access.

My mental model anyway is that this trivial inline would be something the VM would do readily.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/25280#discussion_r2096089013


More information about the core-libs-dev mailing list