Apache Lucene open-source search software
LUCENE-6932: also fix RAFIndexInput to throw EOFE if you seek beyond end of file
Michael McCandlessf4cdb556e430
diff --git a/lucene/misc/src/java/org/apache/lucene/store/RAFDirectory.java b/lucene/misc/src/java/org/apache/lucene/store/RAFDirectory.javaindex 9c3e9b0fc60..94be104fd4d 100644--- a/lucene/misc/src/java/org/apache/lucene/store/RAFDirectory.java+++ b/lucene/misc/src/java/org/apache/lucene/store/RAFDirectory.java@@ -165,7 +165,10 @@ public class RAFDirectory extends FSDirectory {}@Override- protected void seekInternal(long position) {+ protected void seekInternal(long pos) throws IOException {+ if (pos > length()) {+ throw new EOFException("read past EOF: pos=" + pos + " vs length=" + length() + ": " + this);+ }}boolean isFDValid() throws IOException {