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 2011/11/10 00:57:25 UTC
svn commit: r1200051 - in /lucene/dev/trunk/lucene:
contrib/misc/src/java/org/apache/lucene/store/WindowsDirectory.java
src/java/org/apache/lucene/store/NIOFSDirectory.java
src/java/org/apache/lucene/store/RAMInputStream.java
Author: mikemccand
Date: Wed Nov 9 23:57:24 2011
New Revision: 1200051
URL: http://svn.apache.org/viewvc?rev=1200051&view=rev
Log:
LUCENE-3539: include resource in a few more cases
Modified:
lucene/dev/trunk/lucene/contrib/misc/src/java/org/apache/lucene/store/WindowsDirectory.java
lucene/dev/trunk/lucene/src/java/org/apache/lucene/store/NIOFSDirectory.java
lucene/dev/trunk/lucene/src/java/org/apache/lucene/store/RAMInputStream.java
Modified: lucene/dev/trunk/lucene/contrib/misc/src/java/org/apache/lucene/store/WindowsDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/contrib/misc/src/java/org/apache/lucene/store/WindowsDirectory.java?rev=1200051&r1=1200050&r2=1200051&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/contrib/misc/src/java/org/apache/lucene/store/WindowsDirectory.java (original)
+++ lucene/dev/trunk/lucene/contrib/misc/src/java/org/apache/lucene/store/WindowsDirectory.java Wed Nov 9 23:57:24 2011
@@ -97,7 +97,7 @@ public class WindowsDirectory extends FS
}
if (bytesRead != length) {
- throw new EOFException("Read past EOF: " + this);
+ throw new EOFException("Read past EOF (resource: " + this + ")");
}
}
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/store/NIOFSDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/store/NIOFSDirectory.java?rev=1200051&r1=1200050&r2=1200051&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/store/NIOFSDirectory.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/store/NIOFSDirectory.java Wed Nov 9 23:57:24 2011
@@ -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 FSDi
long pos = getFilePointer() + off;
if (pos + len > end) {
- throw new IOException("read past EOF: " + this);
+ throw new EOFException("read past EOF (resource: " + this + ")");
}
try {
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/store/RAMInputStream.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/store/RAMInputStream.java?rev=1200051&r1=1200050&r2=1200051&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/store/RAMInputStream.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/store/RAMInputStream.java Wed Nov 9 23:57:24 2011
@@ -91,7 +91,7 @@ public class RAMInputStream extends Inde
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--;