8354335: No longer deprecate wrapper class constructors for removal

Reviewed-by: liach, bchristi, iris
This commit is contained in:
Roger Riggs 2025-04-28 21:36:14 +00:00
parent 62d165d0e4
commit 1fd136cd6b
9 changed files with 22 additions and 22 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -104,7 +104,7 @@ public final class Boolean implements java.io.Serializable,
* Also consider using the final fields {@link #TRUE} and {@link #FALSE}
* if possible.
*/
@Deprecated(since="9", forRemoval = true)
@Deprecated(since="9")
public Boolean(boolean value) {
this.value = value;
}
@ -124,7 +124,7 @@ public final class Boolean implements java.io.Serializable,
* {@code boolean} primitive, or use {@link #valueOf(String)}
* to convert a string to a {@code Boolean} object.
*/
@Deprecated(since="9", forRemoval = true)
@Deprecated(since="9")
public Boolean(String s) {
this(parseBoolean(s));
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -346,7 +346,7 @@ public final class Byte extends Number implements Comparable<Byte>, Constable {
* {@link #valueOf(byte)} is generally a better choice, as it is
* likely to yield significantly better space and time performance.
*/
@Deprecated(since="9", forRemoval = true)
@Deprecated(since="9")
public Byte(byte value) {
this.value = value;
}
@ -369,7 +369,7 @@ public final class Byte extends Number implements Comparable<Byte>, Constable {
* {@code byte} primitive, or use {@link #valueOf(String)}
* to convert a string to a {@code Byte} object.
*/
@Deprecated(since="9", forRemoval = true)
@Deprecated(since="9")
public Byte(String s) throws NumberFormatException {
this.value = parseByte(s, 10);
}

View File

@ -9232,7 +9232,7 @@ class Character implements java.io.Serializable, Comparable<Character>, Constabl
* {@link #valueOf(char)} is generally a better choice, as it is
* likely to yield significantly better space and time performance.
*/
@Deprecated(since="9", forRemoval = true)
@Deprecated(since="9")
public Character(char value) {
this.value = value;
}

View File

@ -1041,7 +1041,7 @@ public final class Double extends Number
* {@link #valueOf(double)} is generally a better choice, as it is
* likely to yield significantly better space and time performance.
*/
@Deprecated(since="9", forRemoval = true)
@Deprecated(since="9")
public Double(double value) {
this.value = value;
}
@ -1062,7 +1062,7 @@ public final class Double extends Number
* {@code double} primitive, or use {@link #valueOf(String)}
* to convert a string to a {@code Double} object.
*/
@Deprecated(since="9", forRemoval = true)
@Deprecated(since="9")
public Double(String s) throws NumberFormatException {
value = parseDouble(s);
}

View File

@ -668,7 +668,7 @@ public final class Float extends Number
* {@link #valueOf(float)} is generally a better choice, as it is
* likely to yield significantly better space and time performance.
*/
@Deprecated(since="9", forRemoval = true)
@Deprecated(since="9")
public Float(float value) {
this.value = value;
}
@ -684,7 +684,7 @@ public final class Float extends Number
* static factory method {@link #valueOf(float)} method as follows:
* {@code Float.valueOf((float)value)}.
*/
@Deprecated(since="9", forRemoval = true)
@Deprecated(since="9")
public Float(double value) {
this.value = (float)value;
}
@ -705,7 +705,7 @@ public final class Float extends Number
* {@code float} primitive, or use {@link #valueOf(String)}
* to convert a string to a {@code Float} object.
*/
@Deprecated(since="9", forRemoval = true)
@Deprecated(since="9")
public Float(String s) throws NumberFormatException {
value = parseFloat(s);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -1024,7 +1024,7 @@ public final class Integer extends Number
* {@link #valueOf(int)} is generally a better choice, as it is
* likely to yield significantly better space and time performance.
*/
@Deprecated(since="9", forRemoval = true)
@Deprecated(since="9")
public Integer(int value) {
this.value = value;
}
@ -1046,7 +1046,7 @@ public final class Integer extends Number
* {@code int} primitive, or use {@link #valueOf(String)}
* to convert a string to an {@code Integer} object.
*/
@Deprecated(since="9", forRemoval = true)
@Deprecated(since="9")
public Integer(String s) throws NumberFormatException {
this.value = parseInt(s, 10);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -1109,7 +1109,7 @@ public final class Long extends Number
* {@link #valueOf(long)} is generally a better choice, as it is
* likely to yield significantly better space and time performance.
*/
@Deprecated(since="9", forRemoval = true)
@Deprecated(since="9")
public Long(long value) {
this.value = value;
}
@ -1132,7 +1132,7 @@ public final class Long extends Number
* {@code long} primitive, or use {@link #valueOf(String)}
* to convert a string to a {@code Long} object.
*/
@Deprecated(since="9", forRemoval = true)
@Deprecated(since="9")
public Long(String s) throws NumberFormatException {
this.value = parseLong(s, 10);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -352,7 +352,7 @@ public final class Short extends Number implements Comparable<Short>, Constable
* {@link #valueOf(short)} is generally a better choice, as it is
* likely to yield significantly better space and time performance.
*/
@Deprecated(since="9", forRemoval = true)
@Deprecated(since="9")
public Short(short value) {
this.value = value;
}
@ -375,7 +375,7 @@ public final class Short extends Number implements Comparable<Short>, Constable
* {@code short} primitive, or use {@link #valueOf(String)}
* to convert a string to a {@code Short} object.
*/
@Deprecated(since="9", forRemoval = true)
@Deprecated(since="9")
public Short(String s) throws NumberFormatException {
this.value = parseShort(s, 10);
}

View File

@ -711,7 +711,7 @@ final class MemberName implements Member, Cloneable {
}
@Override
@SuppressWarnings("removal")
@SuppressWarnings("deprecation")
public int hashCode() {
// Avoid autoboxing getReferenceKind(), since this is used early and will force
// early initialization of Byte$ByteCache