From 574a6a9d653a1ad078d8d0ba54cb0c3ac2ceac1d Mon Sep 17 00:00:00 2001 From: Christine Poerschke Date: Wed, 11 May 2016 13:42:46 +0100 Subject: [PATCH] SOLR-9093: Fix NullPointerException in TopGroupsShardResponseProcessor. --- solr/CHANGES.txt | 2 ++ .../responseprocessor/TopGroupsShardResponseProcessor.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index ec413b1677a..152bc9158d3 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -170,6 +170,8 @@ Bug Fixes * SOLR-9058: Makes HashJoinStream and OuterHashJoinStream support different field names in the incoming streams, eg. fieldA=fieldB. (Dennis Gove, Stephan Osthold) +* SOLR-9093: Fix NullPointerException in TopGroupsShardResponseProcessor. (Christine Poerschke) + Optimizations ---------------------- * SOLR-8722: Don't force a full ZkStateReader refresh on every Overseer operation. diff --git a/solr/core/src/java/org/apache/solr/search/grouping/distributed/responseprocessor/TopGroupsShardResponseProcessor.java b/solr/core/src/java/org/apache/solr/search/grouping/distributed/responseprocessor/TopGroupsShardResponseProcessor.java index fa8de2428e7..d0a06c59d11 100644 --- a/solr/core/src/java/org/apache/solr/search/grouping/distributed/responseprocessor/TopGroupsShardResponseProcessor.java +++ b/solr/core/src/java/org/apache/solr/search/grouping/distributed/responseprocessor/TopGroupsShardResponseProcessor.java @@ -99,7 +99,7 @@ public class TopGroupsShardResponseProcessor implements ShardResponseProcessor { if (srsp.getException() != null) { Throwable t = srsp.getException(); - if (t instanceof SolrServerException) { + if (t instanceof SolrServerException && ((SolrServerException) t).getCause() != null) { t = ((SolrServerException) t).getCause(); } individualShardInfo.add("error", t.toString());