On Sun, 18 May 2025 18:18:04 GMT, Joe Darcy <da...@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.

> Are there regression tests for 
> Class::componentType()/Class::getComponentType() somewhere? I didn't see them 
> in the obvious test/jdk/java/lang/Class directory.

They are located in `test/jdk/java/lang/constant/TypeDescriptorTest.java`.

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

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

Reply via email to