RFR: 8263108: Class initialization deadlock in java.lang.constant [v4]
Jaikiran Pai
jpai at openjdk.java.net
Tue Mar 16 14:50:07 UTC 2021
On Tue, 16 Mar 2021 12:19:11 GMT, Peter Levart <plevart at openjdk.org> wrote:
> 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).
I think that's a good idea. I went ahead and added a regular comment at the top of that method to warn about this potential deadlock. I decided not to use a javadoc comment since IMO, this is too much of an internal implementation detail to end up being part of the javadoc.
I ran `make docs-jdk` after this change just to sure this comment doesn't cause any javadoc generation failures. The build went fine and the generated javadoc isn't impacted.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2893
More information about the core-libs-dev
mailing list