mirror of https://github.com/apache/lucene.git
LUCENE-3539: include resource in a few more cases
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1200051 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8162656384
commit
c0c36d00d6
|
@ -97,7 +97,7 @@ public class WindowsDirectory extends FSDirectory {
|
|||
}
|
||||
|
||||
if (bytesRead != length) {
|
||||
throw new EOFException("Read past EOF: " + this);
|
||||
throw new EOFException("Read past EOF (resource: " + this + ")");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ package org.apache.lucene.store;
|
|||
*/
|
||||
|
||||
import java.io.File;
|
||||
import java.io.EOFException;
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.channels.ClosedChannelException; // javadoc @link
|
||||
|
@ -181,7 +182,7 @@ public class NIOFSDirectory extends FSDirectory {
|
|||
long pos = getFilePointer() + off;
|
||||
|
||||
if (pos + len > end) {
|
||||
throw new IOException("read past EOF: " + this);
|
||||
throw new EOFException("read past EOF (resource: " + this + ")");
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
|
@ -91,7 +91,7 @@ public class RAMInputStream extends IndexInput implements Cloneable {
|
|||
if (currentBufferIndex >= file.numBuffers()) {
|
||||
// end of file reached, no more buffers left
|
||||
if (enforceEOF) {
|
||||
throw new EOFException("Read past EOF: " + this);
|
||||
throw new EOFException("Read past EOF (resource: " + this + ")");
|
||||
} else {
|
||||
// Force EOF if a read takes place at this position
|
||||
currentBufferIndex--;
|
||||
|
|
Loading…
Reference in New Issue