RFR: 8310242: Clarify the name parameter to Class::forName [v4]

David Holmes dholmes at openjdk.org
Mon Jun 19 01:38:08 UTC 2023


On Sun, 18 Jun 2023 18:54:22 GMT, Jens Lidestrom <duke at openjdk.org> wrote:

>> Mandy Chung has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   missing 'L' for the array class name
>
> src/java.base/share/classes/java/lang/Class.java line 395:
> 
>> 393:      * attached thread), the system class loader is used.
>> 394:      *
>> 395:      * @param     className the <a href="#binary-name">binary name</a> of the class
> 
> Where do these links lead? I don't find any section with this ID in the `Class` Javadoc. Should they lead to `ClassLoader`? That Javadoc has such a section.

This seems a specification change as the binary-name and FQN are not always the same. In particular for a member class `M` in class `C` the binary name is `C$M`, whereas the FQN is `C.M`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14528#discussion_r1233436089


More information about the core-libs-dev mailing list