You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Dick Larsson (JIRA)" <ji...@apache.org> on 2010/11/16 15:52:13 UTC
[jira] Created: (SOLR-2238) SolrResponseBase.toString() throws
unexpected NullPointer exception
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org