RFR: 8252180: [JEP 390] Deprecate wrapper class constructors for removal

Mandy Chung mchung at openjdk.java.net
Sat Oct 10 00:08:16 UTC 2020


On Fri, 9 Oct 2020 23:35:43 GMT, Joe Darcy <darcy at openjdk.org> wrote:

>> The public constructors of the following classes have been deprecated since SE 9, and should be deprecated for removal
>> in anticipation of these classes becoming inline classes.
>> java.lang.Boolean, Byte, Short, Integer, Long, Float, Double, and Character.
>> 
>> Existing uses of the constructors are converted to use the .valueOf(xxx) methods in classes and tests.
>
> test/jdk/java/lang/WrappersTest.java line 1:
> 
>> 1: /*
> 
> We have historically not found it necessary to write tests to verify this kind of change and have instead relied on
> signature testing.

+1.

FWIW.  You have also verified when you get the warnings from JDK build and needs to suppressed it.

-------------

PR: https://git.openjdk.java.net/valhalla/pull/221



More information about the valhalla-dev mailing list