SolrResponseBase.toString() throws unexpected NullPointer exception
-------------------------------------------------------------------
Key: SOLR-2238
URL: https://issues.apache.org/jira/browse/SOLR-2238
Project: Solr
Issue Type: Bug
Components: clients - java
Affects Versions: 1.4.1, 1.4
Environment: SolrJ 1.4.1 running om IBM WebSphere Application Server 7
on AIX.
Reporter: Dick Larsson
Priority: Minor
SolrResponseBase.toString() method, row 55 does not check for null and can
throw NullPointerException.
SolrResponseBase has a field
private NamedList<Object> response
The SolrResponseBase.toString() just returns response.toString() without
checking if field "response" is null, causing a NullPointerException to be
thrown.
You can create an instance of QueryResponse.
But if you invoke toString a nullpointer will be thrown
QueryResponse rsp = new QueryResponse();
System.out.println(rsp);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]