Skip to content

Apache Lucene open-source search software

when we do a quick truncation check, give a hint to the root cause

Robert Muirabaa5f669841
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/CodecUtil.java b/lucene/core/src/java/org/apache/lucene/codecs/CodecUtil.java
index 2cd0365f4ba..0181619a21c 100644
--- a/lucene/core/src/java/org/apache/lucene/codecs/CodecUtil.java
+++ b/lucene/core/src/java/org/apache/lucene/codecs/CodecUtil.java
@@ -413,7 +413,7 @@ public final class CodecUtil {
final int magic = in.readInt();
if (magic != FOOTER_MAGIC) {
- throw new CorruptIndexException("codec footer mismatch: actual footer=" + magic + " vs expected footer=" + FOOTER_MAGIC, in);
+ throw new CorruptIndexException("codec footer mismatch (file truncated?): actual footer=" + magic + " vs expected footer=" + FOOTER_MAGIC, in);
}
final int algorithmID = in.readInt();