You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Alexandre Rafalovitch (JIRA)" <ji...@apache.org> on 2016/10/02 01:39:20 UTC
[jira] [Closed] (SOLR-2238) SolrResponseBase.toString() throws
unexpected NullPointer exception
[ https://issues.apache.org/jira/browse/SOLR-2238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexandre Rafalovitch closed SOLR-2238.
---------------------------------------
Resolution: Won't Fix
Ancient code path. If happens again with latest Solr a new issue can be opened.
> 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.4.1
> 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 was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org