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.

Reply via email to