RFR: 8263108: Class initialization deadlock in java.lang.constant [v4]
Peter Levart
plevart at openjdk.java.net
Tue Mar 16 12:22:17 UTC 2021
On Tue, 16 Mar 2021 07:29:34 GMT, Vyom Tewari <vtewari at openjdk.org> wrote:
>> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Use Chris' suggested solution of avoiding deadlock
>
> Looks good to me.
Holder pattern is easier to understand, I agree. Perhaps you could just add a warning to the DynamicConstantDesc.ofCanonical() method javadoc/comment about what *NOT* to do in order to not fall into the deadlock trap again... (like: don't call this method from static initializer of ConstantDescs or such).
Otherwise it looks good to me to.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2893
More information about the core-libs-dev
mailing list