RFR: 8261407: ReflectionFactory.checkInitted() is not thread-safe [v5]
Mandy Chung
mchung at openjdk.java.net
Fri Feb 11 03:57:07 UTC 2022
On Fri, 11 Feb 2022 02:08:27 GMT, liach <duke at openjdk.java.net> wrote:
>> Worth a try. Even the regular class, the constructor taking 5 fields isn't too bad to me. In a near future, I hope to remove the old core reflection implementation, `noInflation` and `inflationThreshold` will be removed and fewer fields.
>
> I made a commit with the config class converted into a record. Apparently the tests are passing, and I would assume it would be feasible. Should I apply it?
> https://github.com/liachmodded/jdk/commit/8cf5af417a6f906e9fc0c878d60731d6f026b528
yes and I can take a closer it.
Indy is ready to use very early during VM initialization before initPhase2 where the module system is initialized. AFAIU, indy is needed for the object methods for records i.e. `equals`, `hashCode`, and `toString`. Just record object instantiation and accessing its final fields don't use indy.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6889
More information about the core-libs-dev
mailing list