This is an automated email from the ASF dual-hosted git repository.
epugh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new 1a322d9fd07 SOLR-17209: Fix NullPointerException in QueryComponent
(#2354)
1a322d9fd07 is described below
commit 1a322d9fd07ec459a33ffd602f4a836da749cd51
Author: Vincent Primault <[email protected]>
AuthorDate: Mon Mar 25 13:04:04 2024 +0100
SOLR-17209: Fix NullPointerException in QueryComponent (#2354)
---------
Co-authored-by: Vincent Primault <[email protected]>
Co-authored-by: Eric Pugh <[email protected]>
---
solr/CHANGES.txt | 2 ++
.../core/src/java/org/apache/solr/handler/component/QueryComponent.java | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 44f58030013..7cf02fdbe19 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -148,6 +148,8 @@ Bug Fixes
* SOLR-14892: Queries with shards.info and shards.tolerant can yield multiple
null keys in place of shard names
(Mathieu Marie, David Smiley)
+* SOLR-17209: Fix NullPointerException in QueryComponent (Vincent Primault via
Eric Pugh)
+
Dependency Upgrades
---------------------
diff --git
a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
index 8b34422ddfe..4f17cb7652b 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
@@ -956,7 +956,7 @@ public class QueryComponent extends SearchComponent {
if (srsp.getException() != null) {
Throwable t = srsp.getException();
- if (t instanceof SolrServerException) {
+ if (t instanceof SolrServerException && t.getCause() != null) {
t = t.getCause();
}
nl.add("error", t.toString());