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);
|
rsp.setHttpCaching(httpCaching);
|
||||||
handleRequestBody( req, rsp );
|
handleRequestBody( req, rsp );
|
||||||
// count timeouts
|
// count timeouts
|
||||||
boolean timedOut = (Boolean)rsp.getResponseHeader().get("partialResults") == null ? false : (Boolean)rsp.getResponseHeader().get("partialResults");
|
NamedList header = rsp.getResponseHeader();
|
||||||
if( timedOut ) {
|
if(header != null) {
|
||||||
numTimeouts++;
|
Object partialResults = header.get("partialResults");
|
||||||
rsp.setHttpCaching(false);
|
boolean timedOut = partialResults == null ? false : (Boolean)partialResults;
|
||||||
|
if( timedOut ) {
|
||||||
|
numTimeouts++;
|
||||||
|
rsp.setHttpCaching(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
SolrException.log(SolrCore.log,e);
|
SolrException.log(SolrCore.log,e);
|
||||||
|
|
Loading…
Reference in New Issue