Fixed NPE when group value is null

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1154739 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Martijn van Groningen 2011-08-07 18:08:20 +00:00
parent 0bc43983c4
commit 592b47f735
1 changed files with 1 additions and 1 deletions

View File

@ -211,7 +211,7 @@ public class QueryResponse extends SolrResponseBase
SimpleOrderedMap grpMap = (SimpleOrderedMap) oGrp;
Object sGroupValue = grpMap.get( "groupValue");
SolrDocumentList doclist = (SolrDocumentList) grpMap.get( "doclist");
Group group = new Group(sGroupValue.toString(), doclist) ;
Group group = new Group(sGroupValue != null ? sGroupValue.toString() : null, doclist) ;
groupedCommand.add(group);
}