RFR: 8309819: Clarify API note in Class::getName and MethodType::toMethodDescriptorString [v6]
Mandy Chung
mchung at openjdk.org
Mon Jun 26 22:33:10 UTC 2023
On Mon, 26 Jun 2023 22:17:16 GMT, Chen Liang <liach at openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/invoke/MethodType.java line 1229:
>>
>>> 1227: *
>>> 1228: * @apiNote
>>> 1229: * This is not a strict inverse of {@link #fromMethodDescriptorString
>>
>> Re-reading this, I think this api note reads fine. OTOH I find a little confusing how you rephrased it. "A method type produced by changing a component class object to...". I understand you tried to make it crystal clear two method types may have the identical descriptor strings even if its parameter type or return type are distinct Class objects.
>>
>> I think the original version is clear enough and less lengthy.
>
> * Two distinct classes which share a common name but have different class loaders
> * produce identical component descriptors in descriptor strings.
>
> Does this sound good? This also addresses alan's wording concerns.
Why can't just say "identical descriptor strings"? It's unclear what "component descriptor" is.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14411#discussion_r1242877851
More information about the core-libs-dev
mailing list