RFR: JDK-8310267: Javadoc for Class#isPrimitive() is incorrect regarding Class objects for primitives

Alan Bateman alanb at openjdk.org
Wed Jun 21 12:37:24 UTC 2023


On Wed, 21 Jun 2023 00:00:54 GMT, Joe Darcy <darcy at openjdk.org> wrote:

> Correct misstatement that the Class object for a primitive type can only be be access via fields like java.lang.Integer.TYPE.

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

> 821:      *
> 822:      * @apiNote
> 823:      * These {@code Class} objects can be accessed via the {@code

It might be clearer if the API note starts with something like "A Class object representing a primitive type" rather than "These Class objects".

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14574#discussion_r1236929019


More information about the core-libs-dev mailing list