Skip to content

Commit 4ad18cf

Browse files
scientificwareAndrey Turbanov
authored and
Andrey Turbanov
committed
8289730: Deprecated code sample in java.lang.ClassCastException
Reviewed-by: darcy
1 parent d8f4e97 commit 4ad18cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/java.base/share/classes/java/lang/ClassCastException.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1994, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1994, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,7 @@
3030
* to a subclass of which it is not an instance. For example, the
3131
* following code generates a {@code ClassCastException}:
3232
* <blockquote><pre>
33-
* Object x = new Integer(0);
33+
* Object x = Integer.valueOf(0);
3434
* System.out.println((String)x);
3535
* </pre></blockquote>
3636
*

0 commit comments

Comments
 (0)