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

Roger Riggs rriggs at openjdk.java.net
Fri Oct 9 21:48:14 UTC 2020


On Fri, 9 Oct 2020 21:36:33 GMT, Dan Smith <dlsmith 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.
>
> src/java.base/share/classes/java/lang/invoke/MemberName.java line 776:
> 
>> 774:
>> 775:     @Override
>> 776:     @SuppressWarnings({"deprecation", "removal"})
> 
> What's going to happen to these warning suppressions when we actually remove (make private) the constructors? Is the
> intent to just defer that problem until it happens?

When the code is changed to not use the constructors, the warning (deprecation and remove) should be removed.
Some of the code is upstream and requires more changes.

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

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



More information about the valhalla-dev mailing list