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

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


On Fri, 9 Oct 2020 21:45:32 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> 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.

We should change `MemberName` to call the factory method `Byte::valueof` (that's JDK code).

For the Graal change, you are touching the code anyway -- I think changing them to use the factory methods would be
better than adding "removal" to the suppression.   But it may be better to check if these tests  intentionally test
with the public constructors to test for JIT optimization before applying the change.

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

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



More information about the valhalla-dev mailing list