-
Enhancement
-
Resolution: Fixed
-
P4
-
17
-
b05
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8300386 | 20.0.1 | Dukebot | P4 | Resolved | Fixed | b02 |
JDK-8300149 | 20 | Dukebot | P4 | Resolved | Fixed | b32 |
A DESCRIPTION OF THE PROBLEM :
There are several code samples in the Java SE API documentation still using constructors of primitive wrapper classes, which are deprecated for removal. They should be replaced by valueOf factory methods or auto-boxing.
Here's what I found:
java.lang.ArrayStoreException
java.lang.ClassCastException
java.lang.Double.compare(double, double)
java.lang.Float.compare(float, float)
java.lang.Integer.getInteger(String, int)
java.lang.Integer.valueOf(String)
java.lang.Integer.valueOf(String, int)
java.lang.Long.getLong(String, long)
java.lang.Long.valueOf(String)
java.lang.Long.valueOf(String, int)
java.lang.Short.valueOf(String)
java.lang.Short.valueOf(String, int)
There are several code samples in the Java SE API documentation still using constructors of primitive wrapper classes, which are deprecated for removal. They should be replaced by valueOf factory methods or auto-boxing.
Here's what I found:
java.lang.ArrayStoreException
java.lang.ClassCastException
java.lang.Double.compare(double, double)
java.lang.Float.compare(float, float)
java.lang.Integer.getInteger(String, int)
java.lang.Integer.valueOf(String)
java.lang.Integer.valueOf(String, int)
java.lang.Long.getLong(String, long)
java.lang.Long.valueOf(String)
java.lang.Long.valueOf(String, int)
java.lang.Short.valueOf(String)
java.lang.Short.valueOf(String, int)
- backported by
-
JDK-8300149 Usage of constructors of primitive wrapper classes should be avoided in java.lang API docs
-
- Resolved
-
-
JDK-8300386 Usage of constructors of primitive wrapper classes should be avoided in java.lang API docs
-
- Resolved
-
- clones
-
JDK-8299502 Usage of constructors of primitive wrapper classes should be avoided in javax.xml API docs
-
- Resolved
-
- links to
-
Commit openjdk/jdk20/ab7f43f0
-
Commit openjdk/jdk/d663b5da
-
Review openjdk/jdk20/104
-
Review openjdk/jdk/11912
(2 links to)