On Wed, 14 Jun 2023 00:10:08 GMT, Chen Liang <li...@openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/invoke/MethodType.java line 1233: >> >>> 1231: * will appear identical when viewed within descriptor strings. >>> 1232: * In addition, the result string is not a bytecode descriptor if >>> this >>> 1233: * method type cannot be {@linkplain ##descriptor described >>> nominally}. >> >> This method is equivalent to `MethodType::descriptorString` which specifies >> the result descriptor string if a method type descriptor not. So I think >> this sentence may not be needed. > > Should we consolidate this distinct class loader note into `descriptorString` > too? This method was added prior to `MethodTypeDesc`. MethodTypeDesc::ofDescriptor` and `MethodTypeDesc::resolveConstantDesc` would be the alternative way to get back the method type. I tend to think that `descriptorString` would not need that distinct class loader note (as it would use the Lookup class to resolve instead). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14411#discussion_r1228858321