8342865: Use type parameter for Class::getPrimitiveClass

Reviewed-by: darcy
This commit is contained in:
Chen Liang 2024-10-26 14:45:04 +00:00
parent 9e451aa365
commit 40e07a7ea3
10 changed files with 13 additions and 22 deletions

View file

@ -79,8 +79,7 @@ public final class Short extends Number implements Comparable<Short>, Constable
* The {@code Class} instance representing the primitive type
* {@code short}.
*/
@SuppressWarnings("unchecked")
public static final Class<Short> TYPE = (Class<Short>) Class.getPrimitiveClass("short");
public static final Class<Short> TYPE = Class.getPrimitiveClass("short");
/**
* Returns a new {@code String} object representing the