Apache Lucene open-source search software
fix test bug
Michael McCandless9fea8e4a27a8
diff --git a/lucene/test-framework/src/java/org/apache/lucene/index/BasePostingsFormatTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/index/BasePostingsFormatTestCase.javaindex 5c2bab39587..8938be6de09 100644--- a/lucene/test-framework/src/java/org/apache/lucene/index/BasePostingsFormatTestCase.java+++ b/lucene/test-framework/src/java/org/apache/lucene/index/BasePostingsFormatTestCase.java@@ -1497,9 +1497,7 @@ public abstract class BasePostingsFormatTestCase extends LuceneTestCase {}// Also test seeking the TermsEnum:- // must make copy because this very code sometimes makes puts while iterating?!- Set<String> copy = new HashSet<String>(termFreqs.keySet());- for(String term : copy) {+ for(String term : termFreqs.keySet()) {if (termsEnum.seekExact(new BytesRef(term))) {if (random().nextBoolean()) {docs = termsEnum.docs(null, docs, DocsEnum.FLAG_FREQS);