RFR: 8310242: Clarify the name parameter to Class::forName

Roger Riggs rriggs at openjdk.org
Fri Jun 16 20:18:09 UTC 2023


On Fri, 16 Jun 2023 19:58:08 GMT, Mandy Chung <mchung at openjdk.org> wrote:

> This PR clarifies the spec of the 3-arg Class::forName  regarding the format of the name for an array type which is of the form: one or more of "[" + binary name of the element type + ";'.

src/java.base/share/classes/java/lang/Class.java line 444:

> 442:      * one or more {@code '['} followed by the binary name of the element type
> 443:      * and {@code ';'}, the element type of the array class is loaded but
> 444:      * not initialized.

Do arrays of primitive types need special treatment?  For example, "[I"

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

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


More information about the core-libs-dev mailing list