On Tue, 16 Mar 2021 12:19:11 GMT, Peter Levart <plev...@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