RFR: 8261407: ReflectionFactory.checkInitted() is not thread-safe [v7]

Peter Levart plevart at openjdk.java.net
Mon Feb 14 08:05:12 UTC 2022


On Fri, 11 Feb 2022 21:44:04 GMT, Mandy Chung <mchung at openjdk.org> wrote:

> Note that the object methods of this Config record are called via indy which is 
> available to use after initPhase1.   We can workaround that limitation by
> implementing the object methods.

"Note that the object methods of this Config record are called via indy" is not very precise. They are called as any other method AFAIU. It's their implementation that uses indy, right? So perhaps, a better wording:

"Note that synthetic object methods of this Config record (toString, equals, hashCode) use indy in their implementation which is available to use after initPhase1.  These methods are currently not used, but should they be needed, a workaround is to explicitly (re)implement them."

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

PR: https://git.openjdk.java.net/jdk/pull/6889


More information about the core-libs-dev mailing list