mirror of https://github.com/apache/lucene.git
SOLR-1160: possible null pointer exception path
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@774765 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e14e521c11
commit
95e42190cf
|
@ -130,10 +130,14 @@ public abstract class RequestHandlerBase implements SolrRequestHandler, SolrInfo
|
|||
rsp.setHttpCaching(httpCaching);
|
||||
handleRequestBody( req, rsp );
|
||||
// count timeouts
|
||||
boolean timedOut = (Boolean)rsp.getResponseHeader().get("partialResults") == null ? false : (Boolean)rsp.getResponseHeader().get("partialResults");
|
||||
if( timedOut ) {
|
||||
numTimeouts++;
|
||||
rsp.setHttpCaching(false);
|
||||
NamedList header = rsp.getResponseHeader();
|
||||
if(header != null) {
|
||||
Object partialResults = header.get("partialResults");
|
||||
boolean timedOut = partialResults == null ? false : (Boolean)partialResults;
|
||||
if( timedOut ) {
|
||||
numTimeouts++;
|
||||
rsp.setHttpCaching(false);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
SolrException.log(SolrCore.log,e);
|
||||
|
|
Loading…
Reference in New Issue