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 2020/03/18 01:28:15 UTC

[GitHub] [lucene-solr] dsmiley commented on a change in pull request #1358: SOLR-14256: replaced EMPTY with empty() to fix deadlock

dsmiley commented on a change in pull request #1358: SOLR-14256: replaced EMPTY with empty() to fix deadlock
URL: https://github.com/apache/lucene-solr/pull/1358#discussion_r394058723
 
 

 ##########
 File path: solr/core/src/java/org/apache/solr/search/DocSet.java
 ##########
 @@ -36,6 +36,21 @@
     assert this instanceof BitDocSet || this instanceof SortedIntDocSet;
   }
 
+  // we can't simply use a trivial static initializer "= new SortedIntDocSet" because it can lead to classloader deadlock
+  private static DocSet EMPTY;
+
+  /** An empty instance. */
+  public static DocSet empty() {
 
 Review comment:
   A fine suggestion. Do you think that approach is better?  For this case I find both no better/worse. 

----------------------------------------------------------------
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


With regards,
Apache Git Services

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