You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/01/15 18:13:19 UTC

[GitHub] [lucene-solr] uschindler commented on pull request #2200: LUCENE-9661: Fix deadlock in TermsEnum.EMPTY

uschindler commented on pull request #2200:
URL: https://github.com/apache/lucene-solr/pull/2200#issuecomment-761100335


   IntelliJ has a check for this which works quite good. But in contrast ECJ from Eclipse has not. It would have been great to allow this check.
   
   Maybe check errorprone, maybe they have a rule already? Basically we could add this to forbiddenapis, but that would be a misnomer. All you need is a check if a static initializer of a class references a subclass in any (direct) way. The issue then happens if the subclass is initialized in another thread while the static initializer is running. So generally static initializers that refer to private child classes which cannot be seen befor the parent is initialized, are safe, but that's a detail and needs to be decided.
   
   The Codec Deadlock was exactly that problem, too. Unfortunately for this case a static tool won't have a chance, so a static tool alone is not a full solution.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org