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:
Ryan McKinley 2009-04-09 20:24:34 +00:00
parent c9ed885d3b
commit a162755e24
1 changed files with 5 additions and 2 deletions

View File

@ -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() ) );
}
}
}
}