RFR: 8309819: Clarify API note in Class::getName and MethodType::toMethodDescriptorString [v5]
Mandy Chung
mchung at openjdk.org
Thu Jun 15 16:35:10 UTC 2023
On Thu, 15 Jun 2023 10:04:38 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Chen Liang has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Update the note for getName
>
> src/java.base/share/classes/java/lang/Class.java line 933:
>
>> 931: * classes whose element type is a hidden class or interface cannot be
>> 932: * discovered by {@code forName}.
>> 933: *
>
> This is an API note in Class::getName. It seems excessive to be saying that primitive types, hidden classes, ... can't be discovered with Class.forName. It might be better to just drop the second half of this note.
I think so too. The spec describes the result of a hidden class is of the form: `{@code N + '/' + <suffix>}`. If really needed, we can add in that bullet saying "The result is not a binary name."
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14411#discussion_r1231278882
More information about the core-libs-dev
mailing list