Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

fix for http://bugs.yacy.net/view.php?id=8

orbiter8412f8787d7b
diff --git a/source/net/yacy/kelondro/io/BufferedRecords.java b/source/net/yacy/kelondro/io/BufferedRecords.java
index b06b1fa3d..956202404 100644
--- a/source/net/yacy/kelondro/io/BufferedRecords.java
+++ b/source/net/yacy/kelondro/io/BufferedRecords.java
@@ -98,9 +98,9 @@ public final class BufferedRecords {
final byte[] bb;
synchronized (this) {
assert b.length - start >= efs.recordsize;
- if (index >= size()) throw new IndexOutOfBoundsException("kelondroBufferedEcoFS.get(" + index + ") outside bounds (" + this.size() + ")");
bb = buffer.get(idx);
if (bb == null) {
+ if (index >= size()) throw new IndexOutOfBoundsException("kelondroBufferedEcoFS.get(" + index + ") outside bounds (" + this.size() + ")");
efs.get(index, b, start);
return;
}