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

Roger Riggs rriggs at openjdk.java.net
Tue Oct 13 14:35:26 UTC 2020


On Sat, 10 Oct 2020 06:29:48 GMT, Dan Smith <dlsmith at openjdk.org> wrote:

>> 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.
>
> Yeah, Mandy replied to the question I should have asked: for all the suppressed "removal" points, what is the plan to
> fix the offending code? If not now, when? ("Later" may be a reasonable answer, but fleshing out the followup tasks
> would be helpful.)

The comment in MemberName makes it clear that `hashCode` method may be called *before* the cache is setup and `valueOf`
uses the cache.

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

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



More information about the valhalla-dev mailing list