Skip to content

Apache Lucene open-source search software

LUCENE-6910: remove no-op code in CheckIndex.java (https://scan.coverity.com/projects/5620 CID 120040)

Christine Poerschke7b3219791554
diff --git a/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java b/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
index be1603d54b5..11f37bec4d3 100644
--- a/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
+++ b/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
@@ -567,7 +567,6 @@ public final class CheckIndex implements Closeable {
}
String sFormat = "";
- boolean skip = false;
result.segmentsFileName = segmentsFileName;
result.numSegments = numSegments;
@@ -605,11 +604,6 @@ public final class CheckIndex implements Closeable {
msg(infoStream, ":");
}
- if (skip) {
- msg(infoStream, "\nERROR: this index appears to be created by a newer version of Lucene than this tool was compiled on; please re-compile this tool on the matching version of Lucene; exiting");
- result.toolOutOfDate = true;
- return result;
- }
result.newSegments = sis.clone();