Apache Solr open-source search software
use IWC's codecprovider consistently for all operations
Robert Muircf1120f74490
diff --git a/lucene/src/java/org/apache/lucene/index/IndexUpgrader.java b/lucene/src/java/org/apache/lucene/index/IndexUpgrader.javaindex c33d803231d..87a656a8052 100644--- a/lucene/src/java/org/apache/lucene/index/IndexUpgrader.java+++ b/lucene/src/java/org/apache/lucene/index/IndexUpgrader.java@@ -114,12 +114,12 @@ public final class IndexUpgrader {}public void upgrade() throws IOException {- if (!IndexReader.indexExists(dir)) {+ if (!IndexReader.indexExists(dir, iwc.getCodecProvider())) {throw new IndexNotFoundException(dir.toString());}if (!deletePriorCommits) {- final Collection<IndexCommit> commits = IndexReader.listCommits(dir);+ final Collection<IndexCommit> commits = DirectoryReader.listCommits(dir, iwc.getCodecProvider());if (commits.size() > 1) {throw new IllegalArgumentException("This tool was invoked to not delete prior commit points, but the following commits were found: " + commits);}