mirror of https://github.com/apache/lucene.git
LUCENE-6932: also fix NIOFSIndexInput to throw EOFE if you seek beyond end of file
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1726229 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d71d1aa941
commit
95b424b6e1
|
@ -192,6 +192,10 @@ public class NIOFSDirectory 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue