mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
added more asserts to BLOBHeap.flushBuffer() to fix the problem described in
http://forum.yacy-websuche.de/viewtopic.php?f=6&t=1679&hilit=&p=13109#p13109 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5666 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
c545fcb9fa
commit
d4b56d5819
|
@ -170,8 +170,11 @@ public final class BLOBHeap extends BLOBHeapModifier implements BLOB {
|
||||||
index.putl(key, posFile);
|
index.putl(key, posFile);
|
||||||
b = AbstractRandomAccess.int2array(key.length + blob.length);
|
b = AbstractRandomAccess.int2array(key.length + blob.length);
|
||||||
assert b.length == 4;
|
assert b.length == 4;
|
||||||
|
assert posBuffer + 4 < ba.length : "posBuffer = " + posBuffer + ", ba.length = " + ba.length;
|
||||||
System.arraycopy(b, 0, ba, posBuffer, 4);
|
System.arraycopy(b, 0, ba, posBuffer, 4);
|
||||||
|
assert posBuffer + 4 + key.length <= ba.length : "posBuffer = " + posBuffer + ", key.length = " + key.length + ", ba.length = " + ba.length;
|
||||||
System.arraycopy(key, 0, ba, posBuffer + 4, key.length);
|
System.arraycopy(key, 0, ba, posBuffer + 4, key.length);
|
||||||
|
assert posBuffer + 4 + key.length + blob.length <= ba.length : "posBuffer = " + posBuffer + ", key.length = " + key.length + ", blob.length = " + blob.length + ", ba.length = " + ba.length;
|
||||||
System.arraycopy(blob, 0, ba, posBuffer + 4 + key.length, blob.length);
|
System.arraycopy(blob, 0, ba, posBuffer + 4 + key.length, blob.length);
|
||||||
posFile += 4 + key.length + blob.length;
|
posFile += 4 + key.length + blob.length;
|
||||||
posBuffer += 4 + key.length + blob.length;
|
posBuffer += 4 + key.length + blob.length;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user