RFR: 8310242: Clarify the name parameter to Class::forName [v4]
Mandy Chung
mchung at openjdk.org
Tue Jun 20 17:53:30 UTC 2023
On Mon, 19 Jun 2023 01:34:59 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> 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`.
Binary name is a long-standing behavior. It's a spec bug.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14528#discussion_r1235609362
More information about the core-libs-dev
mailing list