mirror of https://github.com/apache/lucene.git
fix potential NPE with FieldStatsInfo
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@763791 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c9ed885d3b
commit
a162755e24
|
@ -131,8 +131,11 @@ public class QueryResponse extends SolrResponseBase
|
|||
NamedList<NamedList<Object>> ff = (NamedList<NamedList<Object>>) info.get( "stats_fields" );
|
||||
if( ff != null ) {
|
||||
for( Map.Entry<String,NamedList<Object>> entry : ff ) {
|
||||
_fieldStatsInfo.put( entry.getKey(),
|
||||
new FieldStatsInfo( entry.getValue(), entry.getKey() ) );
|
||||
NamedList<Object> v = entry.getValue();
|
||||
if( v != null ) {
|
||||
_fieldStatsInfo.put( entry.getKey(),
|
||||
new FieldStatsInfo( v, entry.getKey() ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue