Apache Lucene open-source search software
tests: fix resource leaks
Yonik Seeley4c2744172c3f
diff --git a/solr/src/test/org/apache/solr/handler/component/SpellCheckComponentTest.java b/solr/src/test/org/apache/solr/handler/component/SpellCheckComponentTest.javaindex 519ecd3f41f..6c500016e9a 100644--- a/solr/src/test/org/apache/solr/handler/component/SpellCheckComponentTest.java+++ b/solr/src/test/org/apache/solr/handler/component/SpellCheckComponentTest.java@@ -145,7 +145,7 @@ public class SpellCheckComponentTest extends SolrTestCaseJ4 {spellchecker.add(AbstractLuceneSpellChecker.INDEX_DIR, "spellchecker1");args.add("spellchecker", spellchecker);- // TODO: this is really fragile - find a higher level way to test this.+ // TODO: this is really fragile and error prone - find a higher level way to test this.SpellCheckComponent checker = new SpellCheckComponent();checker.init(args);checker.inform(h.getCore());@@ -164,6 +164,8 @@ public class SpellCheckComponentTest extends SolrTestCaseJ4 {} catch (NullPointerException e) {fail("NullPointerException due to reload not initializing analyzers");}++ rb.req.close();}@SuppressWarnings("unchecked")