You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2016/01/22 19:15:13 UTC
svn commit: r1726266 -
/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/store/SimpleFSDirectory.java
Author: mikemccand
Date: Fri Jan 22 18:15:12 2016
New Revision: 1726266
URL: http://svn.apache.org/viewvc?rev=1726266&view=rev
Log:
LUCENE-6932: fix SimpleFSIndexInput to throw EOFException if you seek beyond end of file
Modified:
lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/store/SimpleFSDirectory.java
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/store/SimpleFSDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/store/SimpleFSDirectory.java?rev=1726266&r1=1726265&r2=1726266&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/store/SimpleFSDirectory.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/store/SimpleFSDirectory.java Fri Jan 22 18:15:12 2016
@@ -190,6 +190,10 @@ public class SimpleFSDirectory extends F
}
@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);
+ }
+ }
}
}