You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Oz Solomon (JIRA)" <ji...@apache.org> on 2007/11/22 21:03:43 UTC
[jira] Created: (SOLR-419) SolrDispatchFilter throws
NullPointerException in some cases
SolrDispatchFilter throws NullPointerException in some cases
------------------------------------------------------------
Key: SOLR-419
URL: https://issues.apache.org/jira/browse/SOLR-419
Project: Solr
Issue Type: Bug
Components: clients - java
Affects Versions: 1.2, 1.3
Environment: Tomcat 6.0/servlet
Reporter: Oz Solomon
Priority: Minor
In the class SolrDispatchFilter, the destroy method is as follows:
public void destroy() {
core.close();
}
The problem is when the servlet doesn't initialize properly (for example, if there is a problem in schema.xml) then core isn't initialized, and this will throw a NullPointerException. A better implementation would be:
public void destroy() {
if (core != null) core.close();
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (SOLR-419) SolrDispatchFilter throws
NullPointerException in some cases
Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ryan McKinley resolved SOLR-419.
--------------------------------
Resolution: Fixed
This looks like it was fixed as part of SOLR-350
> SolrDispatchFilter throws NullPointerException in some cases
> ------------------------------------------------------------
>
> Key: SOLR-419
> URL: https://issues.apache.org/jira/browse/SOLR-419
> Project: Solr
> Issue Type: Bug
> Components: clients - java
> Affects Versions: 1.2, 1.3
> Environment: Tomcat 6.0/servlet
> Reporter: Oz Solomon
> Priority: Minor
>
> In the class SolrDispatchFilter, the destroy method is as follows:
> public void destroy() {
> core.close();
> }
>
> The problem is when the servlet doesn't initialize properly (for example, if there is a problem in schema.xml) then core isn't initialized, and this will throw a NullPointerException. A better implementation would be:
> public void destroy() {
> if (core != null) core.close();
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.