RFR: JDK-8308913: Update core reflection for JEP 445 (preview)

Chen Liang liach at openjdk.org
Fri May 26 21:39:59 UTC 2023


On Fri, 26 May 2023 02:06:55 GMT, Joe Darcy <darcy at openjdk.org> wrote:

> Explain in java.lang.Class how unnamed classes are modeled in core reflection.

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

> 210:  * {@linkplain #getTypeName type name}, {@linkplain #getSimpleName
> 211:  * simple name}, and {@linkplain #getCanonicalName canonical name} all
> 212:  * return results equal to "{@code HelloWorld}".

I recommend moving the quotes into `{@code}` because this is how the file name is represented above. Same is used for existing strings in code, like the rendering of `{@value #STRING_FIELD}` values.
Suggestion:

 * return results equal to {@code "HelloWorld"}.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14165#discussion_r1207393725


More information about the core-libs-dev mailing list