On Mon, 26 Jun 2023 22:36:43 GMT, Chen Liang <[email protected]> wrote:
>> `MethodType::descriptorString` refers to method descriptor and
>> `Class::descriptorString` refers to class descriptor. I don't think it
>> helps to say "produce identical class descriptors in method descriptors".
>
> I think we can put it simple:
> "Two distinct classes which share a common name but have different class
> loaders cannot be distinguished in descriptor strings"
> which stands for both class and method descriptors. How does this sound?
What about "Two distinct {@code MethodType} objects can have an identical
descriptor string as distinct classes can have the same name but different
class loaders."?
This api note basically says that from a given descriptor string,
`fromMethodDescriptorString` may produce a different `MethodType` with a
different class loader.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14411#discussion_r1244169695