You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by kr...@apache.org on 2023/10/23 15:02:40 UTC

[solr] branch branch_9x updated: SOLR-17034: Hitting /solr// ends up with HttpSolrCall NPE when using Solr Cloud (#2020)

This is an automated email from the ASF dual-hosted git repository.

krisden pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new ff2efffd798 SOLR-17034: Hitting /solr// ends up with HttpSolrCall NPE when using Solr Cloud (#2020)
ff2efffd798 is described below

commit ff2efffd7982e64cc97e8c21bc329e0088da7721
Author: Kevin Risden <ri...@users.noreply.github.com>
AuthorDate: Mon Oct 23 11:01:29 2023 -0400

    SOLR-17034: Hitting /solr// ends up with HttpSolrCall NPE when using Solr Cloud (#2020)
---
 solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java b/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
index 67d291b38f7..1bacfed1e18 100644
--- a/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
+++ b/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
@@ -1169,11 +1169,11 @@ public class HttpSolrCall {
             || (liveNodes.contains(replica.getNodeName())
                 && replica.getState() == Replica.State.ACTIVE)) {
 
-          if (byCoreName && !origCorename.equals(replica.getStr(CORE_NAME_PROP))) {
+          if (byCoreName && !Objects.equals(origCorename, replica.getStr(CORE_NAME_PROP))) {
             // if it's by core name, make sure they match
             continue;
           }
-          if (replica.getBaseUrl().equals(cores.getZkController().getBaseUrl())) {
+          if (Objects.equals(replica.getBaseUrl(), cores.getZkController().getBaseUrl())) {
             // don't count a local core
             continue;
           }