cpoerschke commented on code in PR #794:
URL: https://github.com/apache/solr/pull/794#discussion_r853134905


##########
solr/core/src/java/org/apache/solr/handler/IndexFetcher.java:
##########
@@ -1014,8 +1014,10 @@ private void openNewSearcherAndUpdateCommitPoint() 
throws IOException {
     // must get the latest solrCore object because the one we have might be 
closed because of a
     // reload
     // todo stop keeping solrCore around
-    SolrCore core = solrCore.getCoreContainer().getCore(solrCore.getName());
-    try {
+    try (SolrCore core = 
solrCore.getCoreContainer().getCore(solrCore.getName())) {
+      if (core == null) {
+        return; // core closed, presumably
+      }

Review Comment:
   Hmm, yeah, the consequences of going from non-null to null are quite tricky 
to analyse here. So yeah, minimally avoiding the NPE seems safer then.



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

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to