mirror of https://github.com/apache/lucene.git
cleanup - searcher is set to null and closed if not null, but never set to not null
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@782619 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4f1dfdc7da
commit
734ee07107
|
@ -80,7 +80,6 @@ public class FileBasedSpellChecker extends AbstractLuceneSpellChecker {
|
|||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void loadExternalFileDictionary(IndexSchema schema, SolrResourceLoader loader) {
|
||||
IndexSearcher searcher = null;
|
||||
try {
|
||||
|
||||
// Get the field's analyzer
|
||||
|
@ -119,13 +118,6 @@ public class FileBasedSpellChecker extends AbstractLuceneSpellChecker {
|
|||
|
||||
} catch (IOException e) {
|
||||
log.error( "Unable to load spellings", e);
|
||||
} finally {
|
||||
try {
|
||||
if (searcher != null)
|
||||
searcher.close();
|
||||
} catch (IOException e) {
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue