JDK-8289730 : Deprecated code sample in java.lang.ClassCastException
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2022-07-04
  • Updated: 2022-07-06
  • Resolved: 2022-07-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 20
20 masterFixed
Description
A DESCRIPTION OF THE PROBLEM :
A code sample in src/java.base/share/classes/java/lang/ClassCastException.java 
uses the deprecated Integer constructor and should be replaced with Integer.valueOf(int)

@deprecated(since="9")
public Integer​(int value)

https://github.com/openjdk/jdk/pull/9359


Comments
Changeset: 4ad18cf0 Author: ScientificWare <info@scientificware.com> Committer: Andrey Turbanov <aturbanov@openjdk.org> Date: 2022-07-06 08:19:40 +0000 URL: https://git.openjdk.org/jdk/commit/4ad18cf088e12f3582b8f6117a44ae4607f69839
06-07-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/9359 Date: 2022-07-04 06:57:12 +0000
05-07-2022

Can not find the code snip in the report at https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/lang/ClassCastException.java
05-07-2022