LUCENE-6932: fix SimpleFSIndexInput to throw EOFException if you seek beyond end of file

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1726266 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2016-01-22 18:15:12 +00:00
parent 07b5a6f64b
commit e19f4b5934
1 changed files with 5 additions and 1 deletions

View File

@ -190,6 +190,10 @@ public class SimpleFSDirectory extends FSDirectory {
}
@Override
protected void seekInternal(long pos) throws IOException {}
protected void seekInternal(long pos) throws IOException {
if (pos > length()) {
throw new EOFException("read past EOF: pos=" + pos + " vs length=" + length() + ": " + this);
}
}
}
}