RefCounted<SolrIndexSearcher> s = core.getNewestSearcher(false);
        try {
          IndexReader reader = s==null ? null : s.get().getReader();
          if (reader!=null && reader.getIndexCommit() != null &&
reader.getIndexCommit().getGeneration() != 1L) {

If getNewestSearcher(false) happens to return null, we are in for a
nasty surprise when it next trys to decref the null Searcher:

  } catch (IOException e) {
          LOG.warn("Unable to get IndexCommit on startup", e);
  } finally {
          s.decref();
  }

Some internal disagreement in that code...

-- 
- Mark

http://www.lucidimagination.com



Reply via email to