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

Chen Liang liach at openjdk.org
Fri Jun 16 23:22:10 UTC 2023


On Fri, 16 Jun 2023 21:33:44 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 + ";'.
>
> Mandy Chung has updated the pull request incrementally with one additional commit since the last revision:
> 
>   review comment

Changes requested by liach (Author).

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

> 441:      * <p> If {@code name} denotes an array class whose element type
> 442:      * is a class or interface, the name consists of one or more {@code '['}
> 443:      * followed by the binary name of the element type and {@code ';'},

There's an L between [ and component binary name, like [Ljava.lang.Object;

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

PR Review: https://git.openjdk.org/jdk/pull/14528#pullrequestreview-1484545741
PR Review Comment: https://git.openjdk.org/jdk/pull/14528#discussion_r1232872533


More information about the core-libs-dev mailing list