muse-dev[bot] commented on a change in pull request #2120:
URL: https://github.com/apache/lucene-solr/pull/2120#discussion_r541316136



##########
File path: solr/core/src/java/org/apache/solr/cloud/ZkController.java
##########
@@ -692,55 +718,44 @@ public void close() {
   /**
    * Best effort to give up the leadership of a shard in a core after hitting 
a tragic exception
    * @param cd The current core descriptor
-   * @param tragicException The tragic exception from the {@code IndexWriter}
    */
-  public void giveupLeadership(CoreDescriptor cd, Throwable tragicException) {
-    assert tragicException != null;
+  public void giveupLeadership(CoreDescriptor cd) {
     assert cd != null;
-    DocCollection dc = 
getClusterState().getCollectionOrNull(cd.getCollectionName());
+
+    String collection = cd.getCollectionName();
+    DocCollection dc = getClusterState().getCollectionOrNull(collection);
     if (dc == null) return;
 
     Slice shard = dc.getSlice(cd.getCloudDescriptor().getShardId());

Review comment:
       *NULL_DEREFERENCE:*  object returned by `cd.getCloudDescriptor()` could 
be null and is dereferenced at line 729.




----------------------------------------------------------------
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:
us...@infra.apache.org



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

Reply via email to