Skip to content

Apache Lucene open-source search software

LUCENE-7210: TestCoreParser.afterClass now resets (static) indexData/coreParser/analyzer to null.

Christine Poerschkecb840f524223
diff --git a/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/TestCoreParser.java b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/TestCoreParser.java
index 9b18c81848e..82426d06076 100644
--- a/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/TestCoreParser.java
+++ b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/TestCoreParser.java
@@ -55,7 +55,10 @@ public class TestCoreParser extends LuceneTestCase {
public static void afterClass() throws Exception {
if (indexData != null) {
indexData.close();
+ indexData = null;
}
+ coreParser = null;
+ analyzer = null;
}
public void testTermQueryXML() throws ParserException, IOException {